Skip to content

Commit 4d8d764

Browse files
authored
CI: run cargo doc (#775)
Ensures docs build successfully
1 parent 185833a commit 4d8d764

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

.github/workflows/workspace.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Workspace
22

3+
env:
4+
CARGO_INCREMENTAL: 0
5+
RUSTFLAGS: "-Dwarnings"
6+
RUSTDOCFLAGS: "-Dwarnings"
7+
38
on:
49
pull_request:
510
paths-ignore:
@@ -21,6 +26,15 @@ jobs:
2126
components: clippy
2227
- run: cargo clippy --all -- -D warnings
2328

29+
doc:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v6
33+
- uses: dtolnay/rust-toolchain@master
34+
with:
35+
toolchain: stable
36+
- run: cargo doc --workspace --all-features
37+
2438
rustfmt:
2539
runs-on: ubuntu-latest
2640
steps:

pbkdf2/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
//! # }
3939
//! ```
4040
//!
41-
//! If you want to use a different PRF, then you can use [`pbkdf2`][crate::pbkdf2]
42-
//! and [`pbkdf2_array`] functions.
41+
//! If you want to use a different PRF, then you can use [`pbkdf2`] and [`pbkdf2_array`] functions.
4342
//!
4443
//! This crates also provides the high-level password-hashing API through
4544
//! the [`Pbkdf2`] struct and traits defined in the
@@ -171,8 +170,7 @@ where
171170
Ok(())
172171
}
173172

174-
/// A variant of the [`pbkdf2`][crate::pbkdf2] function which returns an array
175-
/// instead of filling an input slice.
173+
/// A variant of the [`pbkdf2`] function which returns an array instead of filling an input slice.
176174
///
177175
/// ```
178176
/// use hex_literal::hex;
@@ -197,7 +195,8 @@ where
197195
pbkdf2::<PRF>(password, salt, rounds, &mut buf).map(|()| buf)
198196
}
199197

200-
/// A variant of the [`pbkdf2`][crate::pbkdf2] function which uses HMAC for PRF.
198+
/// A variant of the [`pbkdf2`] function which uses HMAC for PRF.
199+
///
201200
/// It's generic over (eager) hash functions.
202201
///
203202
/// ```

sha-crypt/src/errors.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
33
use core::fmt;
44

5+
#[cfg(doc)]
6+
use crate::Params;
7+
58
/// Result type for the `sha-crypt` crate with its [`Error`] type.
69
pub type Result<T> = core::result::Result<T, Error>;
710

0 commit comments

Comments
 (0)