From 7a6600bbc6cc3a91a04e598906156d1b275c5409 Mon Sep 17 00:00:00 2001 From: neithanmo Date: Thu, 27 Jun 2024 13:30:54 -0600 Subject: [PATCH] fix clippy --- .github/workflows/main.yml | 2 +- app/rust/Cargo.toml | 3 +++ app/rust/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) 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 {}