diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c36d1af8..90b61cc8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,7 @@ jobs: - name: clippy run: | cd ./app/rust - cargo clippy --all-targets + cargo clippy --all-targets features=clippy build_ledger: needs: configure diff --git a/app/rust/Cargo.toml b/app/rust/Cargo.toml index cba65039..9fac6bef 100644 --- a/app/rust/Cargo.toml +++ b/app/rust/Cargo.toml @@ -11,6 +11,9 @@ resolver = "2" name = "rslib" crate-type = ["staticlib"] +[features] +clippy = [] + [dependencies] no-std-compat = { version = "0.4.1" } numtoa = "0.2.4" diff --git a/app/rust/src/lib.rs b/app/rust/src/lib.rs index 81d48ef3..66d3c9a3 100644 --- a/app/rust/src/lib.rs +++ b/app/rust/src/lib.rs @@ -12,10 +12,10 @@ mod zxformat; fn debug(_msg: &str) {} -#[cfg(not(any(test, fuzzing, clippy)))] +#[cfg(not(any(test, fuzzing, feature = "clippy")))] use core::panic::PanicInfo; -#[cfg(not(any(test, fuzzing, clippy)))] +#[cfg(not(any(test, fuzzing, feature = "clippy")))] #[panic_handler] fn panic(_info: &PanicInfo) -> ! { loop {}