diff --git a/.github/workflows/cargo_clippy.yml b/.github/workflows/cargo_clippy.yml index a51f841..25aa63d 100644 --- a/.github/workflows/cargo_clippy.yml +++ b/.github/workflows/cargo_clippy.yml @@ -29,4 +29,4 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} args: --all-targets --features std - name: Deny Clippy warnings - run: cargo clippy --all-targets --features std -- -D warnings + run: cargo clippy --all-targets --features std -- -A clippy::new_without_default -D warnings diff --git a/run_desktop_tests.sh b/run_desktop_tests.sh index 6c02041..b22e1d8 100755 --- a/run_desktop_tests.sh +++ b/run_desktop_tests.sh @@ -31,7 +31,7 @@ cargo fmt --all -- --check cd ../.. echo "Running Clippy lints..." -cargo clippy --all-targets --features std -- -D warnings +cargo clippy --all-targets --features std -- -A clippy::new_without_default -D warnings echo "Building sha256sum tool..." cargo build --manifest-path third_party/tock/tools/sha256sum/Cargo.toml diff --git a/src/ctap/hid/mod.rs b/src/ctap/hid/mod.rs index cce4291..7489f6e 100644 --- a/src/ctap/hid/mod.rs +++ b/src/ctap/hid/mod.rs @@ -137,7 +137,6 @@ impl CtapHid { const TIMEOUT_DURATION: Duration = Duration::from_ms(100); const WINK_TIMEOUT_DURATION: Duration = Duration::from_ms(5000); - #[allow(clippy::new_without_default)] pub fn new() -> CtapHid { CtapHid { assembler: MessageAssembler::new(), diff --git a/src/ctap/hid/receive.rs b/src/ctap/hid/receive.rs index 5108228..fef51a4 100644 --- a/src/ctap/hid/receive.rs +++ b/src/ctap/hid/receive.rs @@ -49,12 +49,6 @@ pub enum Error { Timeout, } -impl Default for MessageAssembler { - fn default() -> Self { - Self::new() - } -} - impl MessageAssembler { pub fn new() -> MessageAssembler { MessageAssembler { diff --git a/third_party/libtock-drivers/src/console.rs b/third_party/libtock-drivers/src/console.rs index 4b7ff02..4784a42 100644 --- a/third_party/libtock-drivers/src/console.rs +++ b/third_party/libtock-drivers/src/console.rs @@ -25,7 +25,6 @@ pub struct Console { } impl Console { - #[allow(clippy::new_without_default)] pub fn new() -> Console { Console { allow_buffer: [0; BUFFER_SIZE],