diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index f5e0696b..4dbf881f 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -1,5 +1,10 @@ name: Workspace +env: + CARGO_INCREMENTAL: 0 + RUSTFLAGS: "-Dwarnings" + RUSTDOCFLAGS: "-Dwarnings" + on: pull_request: paths-ignore: @@ -21,6 +26,15 @@ jobs: components: clippy - run: cargo clippy --all -- -D warnings + doc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + - run: cargo doc --workspace --all-features + rustfmt: runs-on: ubuntu-latest steps: diff --git a/pbkdf2/src/lib.rs b/pbkdf2/src/lib.rs index 368fc57b..87a48f59 100644 --- a/pbkdf2/src/lib.rs +++ b/pbkdf2/src/lib.rs @@ -38,8 +38,7 @@ //! # } //! ``` //! -//! If you want to use a different PRF, then you can use [`pbkdf2`][crate::pbkdf2] -//! and [`pbkdf2_array`] functions. +//! If you want to use a different PRF, then you can use [`pbkdf2`] and [`pbkdf2_array`] functions. //! //! This crates also provides the high-level password-hashing API through //! the [`Pbkdf2`] struct and traits defined in the @@ -171,8 +170,7 @@ where Ok(()) } -/// A variant of the [`pbkdf2`][crate::pbkdf2] function which returns an array -/// instead of filling an input slice. +/// A variant of the [`pbkdf2`] function which returns an array instead of filling an input slice. /// /// ``` /// use hex_literal::hex; @@ -197,7 +195,8 @@ where pbkdf2::(password, salt, rounds, &mut buf).map(|()| buf) } -/// A variant of the [`pbkdf2`][crate::pbkdf2] function which uses HMAC for PRF. +/// A variant of the [`pbkdf2`] function which uses HMAC for PRF. +/// /// It's generic over (eager) hash functions. /// /// ``` diff --git a/sha-crypt/src/errors.rs b/sha-crypt/src/errors.rs index 39a9164a..4dcb9b4e 100644 --- a/sha-crypt/src/errors.rs +++ b/sha-crypt/src/errors.rs @@ -2,6 +2,9 @@ use core::fmt; +#[cfg(doc)] +use crate::Params; + /// Result type for the `sha-crypt` crate with its [`Error`] type. pub type Result = core::result::Result;