Skip to content

Commit cfc0df9

Browse files
committed
run clippy + rustfmt for cdylib
1 parent d197d0e commit cfc0df9

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.github/workflows/checks.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,22 @@ jobs:
177177
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
178178
with:
179179
toolchain: stable
180-
components: clippy
180+
components: clippy, rustfmt
181181
targets: ${{matrix.target}}
182182
- name: Rust cache
183183
uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8
184184
with:
185185
shared-key: "stable-${{matrix.target}}"
186186

187-
- name: Run clippy
188-
run: cargo clippy --target ${{matrix.target}} ${{matrix.features}} --workspace --all-targets -- -D warnings
187+
- name: Run rustfmt and clippy
188+
run: |
189+
cargo fmt --all --check
190+
cargo clippy --target ${{matrix.target}} ${{matrix.features}} --workspace --all-targets -- -D warnings
191+
- name: Run rustfmt and clippy (cdylib)
192+
working-directory: libz-rs-sys-cdylib
193+
run: |
194+
cargo fmt --all --check
195+
cargo clippy --target ${{matrix.target}} ${{matrix.features}} --workspace --all-targets -- -D warnings
189196
- name: Run clippy (fuzzers)
190197
if: ${{ !contains(matrix.features, 'gz') }}
191198
run: cargo clippy --target ${{matrix.target}} ${{matrix.features}} --manifest-path ./fuzz/Cargo.toml --all-targets -- -D warnings
@@ -265,7 +272,7 @@ jobs:
265272
done
266273
267274
fuzz-code-coverage:
268-
name: Fuzz with code coverage
275+
name: Fuzz with code coverage
269276
runs-on: ubuntu-latest
270277
strategy:
271278
matrix:

libz-rs-sys-cdylib/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ mod custom_prefix {
4747
};
4848
}
4949

50-
#[cfg(all(
51-
not(feature = "custom-prefix"),
52-
not(feature = "semver-prefix"),
53-
any(test)
54-
))]
50+
#[cfg(all(not(feature = "custom-prefix"), not(feature = "semver-prefix"), test))]
5551
macro_rules! prefix {
5652
($name:expr) => {
5753
concat!("LIBZ_RS_SYS_TEST_", stringify!($name))

0 commit comments

Comments
 (0)