From 2e45b72ca109598f1f48469ac031f8c9fee694bb Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Thu, 16 Nov 2023 11:20:50 -0500 Subject: [PATCH] Fix clippy 1.74 errors Signed-off-by: Bryan Gurney --- src/engine/strat_engine/backstore/crypt/shared.rs | 2 +- src/engine/strat_engine/thinpool/thinpool.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/strat_engine/backstore/crypt/shared.rs b/src/engine/strat_engine/backstore/crypt/shared.rs index 0ff10103f2..bc79ee158c 100644 --- a/src/engine/strat_engine/backstore/crypt/shared.rs +++ b/src/engine/strat_engine/backstore/crypt/shared.rs @@ -559,8 +559,8 @@ fn tang_dispatch(json: &Value) -> StratisResult { })?; let mut key = keys .iter() + .find(|&obj| obj.get("key_ops") == Some(&Value::Array(vec![Value::from("verify")]))) .cloned() - .find(|obj| obj.get("key_ops") == Some(&Value::Array(vec![Value::from("verify")]))) .ok_or_else(|| { StratisError::Msg("Verification key not found in clevis metadata".to_string()) })?; diff --git a/src/engine/strat_engine/thinpool/thinpool.rs b/src/engine/strat_engine/thinpool/thinpool.rs index c80e314bce..d79d3baaee 100644 --- a/src/engine/strat_engine/thinpool/thinpool.rs +++ b/src/engine/strat_engine/thinpool/thinpool.rs @@ -2596,7 +2596,7 @@ mod tests { let mut file = OpenOptions::new() .create(true) .write(true) - .open(&new_file) + .open(new_file) .unwrap(); let mut bytes_written = Bytes(0); // Write 400 * IEC::Mi