Skip to content

Commit a39b5af

Browse files
authored
CI: add workspace-level doc check (#1348)
Ensures the docs for all crates build without warnings
1 parent 0842fa8 commit a39b5af

5 files changed

Lines changed: 22 additions & 12 deletions

File tree

.github/workflows/workspace.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,42 @@ on:
1111
env:
1212
CARGO_INCREMENTAL: 0
1313
RUSTFLAGS: "-Dwarnings"
14+
RUSTDOCFLAGS: "-Dwarnings"
1415

1516
# Cancels CI jobs when new commits are pushed to a PR branch
1617
concurrency:
1718
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1819
cancel-in-progress: true
1920

2021
jobs:
21-
rustfmt:
22+
clippy:
2223
runs-on: ubuntu-latest
2324
steps:
2425
- uses: actions/checkout@v6.0.2
26+
- uses: dtolnay/rust-toolchain@master
27+
with:
28+
toolchain: 1.95.0
29+
components: clippy
30+
- run: cargo clippy --all-features -- -D warnings
31+
32+
doc:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v6
2536
- uses: dtolnay/rust-toolchain@master
2637
with:
2738
toolchain: stable
28-
components: rustfmt
29-
- run: cargo fmt --all -- --check
39+
- run: cargo doc --workspace --all-features --no-deps
3040

31-
clippy:
41+
rustfmt:
3242
runs-on: ubuntu-latest
3343
steps:
3444
- uses: actions/checkout@v6.0.2
3545
- uses: dtolnay/rust-toolchain@master
3646
with:
37-
toolchain: 1.95.0
38-
components: clippy
39-
- run: cargo clippy --all-features -- -D warnings
47+
toolchain: stable
48+
components: rustfmt
49+
- run: cargo fmt --all -- --check
4050

4151
typos:
4252
runs-on: ubuntu-latest

ecdsa/src/hazmat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use {
3333
#[cfg(feature = "digest")]
3434
use digest::block_api::EagerHash;
3535

36-
/// Bind a preferred [`Digest`] algorithm to an elliptic curve type.
36+
/// Bind a preferred [`EagerHash`] algorithm to an elliptic curve type.
3737
///
3838
/// Generally there is a preferred variety of the SHA-2 family used with ECDSA
3939
/// for a particular elliptic curve.

ecdsa/src/signing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ use elliptic_curve::pkcs8::{EncodePrivateKey, SecretDocument};
5959
/// primary API for signing:
6060
///
6161
/// - [`Signer`]: sign a message using this key
62-
/// - [`DigestSigner`]: sign the output of a [`Digest`] using this key
62+
/// - [`DigestSigner`]: sign the output of a digest using this key
6363
/// - [`PrehashSigner`]: sign the low-level raw output bytes of a message digest
6464
///
6565
/// See the [`p256` crate](https://docs.rs/p256/latest/p256/ecdsa/index.html)

ecdsa/src/verifying.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ use elliptic_curve::pkcs8::EncodePublicKey;
5858
/// primary API for verifying:
5959
///
6060
/// - [`Verifier`]: verify a message against a provided key and signature
61-
/// - [`DigestVerifier`]: verify a message [`Digest`] against a provided key and signature
61+
/// - [`DigestVerifier`]: verify a message digest against a provided key and signature
6262
/// - [`PrehashVerifier`]: verify the low-level raw output bytes of a message digest
6363
///
6464
/// See the [`p256` crate](https://docs.rs/p256/latest/p256/ecdsa/index.html)

lms/src/lms/private.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl<Mode: LmsMode> RandomizedMultipartSignerMut<Signature<Mode>> for SigningKey
144144
}
145145
}
146146

147-
/// Converts a [PrivateKey] into its byte representation
147+
/// Converts a [`SigningKey`] into its byte representation.
148148
impl<Mode: LmsMode> From<SigningKey<Mode>>
149149
for Array<u8, Sum<<Mode::Hasher as OutputSizeUser>::OutputSize, U28>>
150150
where
@@ -165,7 +165,7 @@ where
165165
}
166166
}
167167

168-
/// Tries to parse a [PrivateKey] from an exact slice
168+
/// Tries to parse a [`SigningKey`] from an exact slice.
169169
impl<'a, Mode: LmsMode> TryFrom<&'a [u8]> for SigningKey<Mode> {
170170
type Error = LmsDeserializeError;
171171

0 commit comments

Comments
 (0)