From d9d8b017293f3c29c24b4fd4078a4aa526a72207 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Tue, 11 Jun 2024 17:44:31 +0200 Subject: [PATCH 1/2] CI: Remove deprecated `actions-rs` and add `cargo doc` test `cargo` is bundled in GitHub's standard actions environments. By running `cargo doc` we can test for broken intradoc links and other markdown constructs. --- .github/workflows/build.yaml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6e10b6a..e2550be 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,36 +11,30 @@ jobs: - macos-latest - windows-latest runs-on: ${{ matrix.os }} - steps: - uses: actions/checkout@v4 - - name: Cargo build - uses: actions-rs/cargo@v1 - with: - command: build - args: --workspace --all-targets + run: cargo build --workspace --all-targets fmt: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - - name: Cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check clippy: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - - name: Cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --workspace --all-targets -- -Dwarnings + run: cargo clippy --workspace --all-targets -- -Dwarnings + + doc: + runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: -Dwarnings + steps: + - uses: actions/checkout@v4 + - name: Cargo doc + run: cargo doc --workspace From 8a9a8cf86680a1ec2fba109af2a50ad73ecdf1a5 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Tue, 11 Jun 2024 17:50:14 +0200 Subject: [PATCH 2/2] Fix broken intradoc link after enum-variant rename --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e501aa4..4c66cf9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ mod ispc; pub trait ImagePixelFormat: Copy { /// Returns the number of channels that an image of this format would have in memory. - /// For example, while a normal map of format [`NormalMapFormat::R8g8TangentSpaceReconstructedZ`] would still have 3 channels when sampled, + /// For example, while a normal map of format [`NormalMapFormat::Rg8TangentSpaceReconstructedZ`] would still have 3 channels when sampled, /// in memory it will have 2 channels. fn num_channel_in_memory(self) -> usize;