From af5b5e305e446135a6965c41d95567da815bf809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Cig=C3=A1nek?= Date: Mon, 18 Sep 2023 10:15:07 +0200 Subject: [PATCH] Fix clippy warnings --- .github/workflows/ci.yml | 2 +- lib/src/db/mod.rs | 2 +- lib/src/store/block_expiration_tracker.rs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac2bdb3d7..5e6f41816 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: run: sudo apt-get install libfuse-dev - name: "Run clippy" - run: cargo clippy --all-targets --no-deps + run: cargo clippy --all-targets --no-deps -- -Dwarnings - name: "Run unit tests" run: cargo test --lib diff --git a/lib/src/db/mod.rs b/lib/src/db/mod.rs index a0a69d454..19d2a5709 100644 --- a/lib/src/db/mod.rs +++ b/lib/src/db/mod.rs @@ -218,7 +218,7 @@ impl WriteTransaction { inner: tx, track_lifetime: Some(track_lifetime), }, - id: id, + id, #[cfg(test)] break_on_commit: None, }) diff --git a/lib/src/store/block_expiration_tracker.rs b/lib/src/store/block_expiration_tracker.rs index 5b940a217..bb2d61610 100644 --- a/lib/src/store/block_expiration_tracker.rs +++ b/lib/src/store/block_expiration_tracker.rs @@ -625,7 +625,6 @@ mod test { let store = store.clone(); let write_keys = write_keys.clone(); - let branch_id = branch_id.clone(); let block: Block = rand::random(); add_block(block.clone(), &write_keys, &branch_id, &store).await; @@ -678,7 +677,7 @@ mod test { .unwrap(); assert!( - (!is_in_db) || (is_in_db && is_in_exp_tracker), + !is_in_db || is_in_exp_tracker, "is_in_db:{is_in_db:?} is_in_exp_tracker:{is_in_exp_tracker:?}" ); }