From 21c6632174f68e97e56d0c7afb73fd90b948e11d Mon Sep 17 00:00:00 2001 From: Ganesh Vanahalli Date: Thu, 28 Mar 2024 11:51:25 -0400 Subject: [PATCH] fix clippy recommendations --- arbitrator/prover/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arbitrator/prover/src/lib.rs b/arbitrator/prover/src/lib.rs index 1a8bf83b26..31cd034f59 100644 --- a/arbitrator/prover/src/lib.rs +++ b/arbitrator/prover/src/lib.rs @@ -329,12 +329,9 @@ pub unsafe extern "C" fn arbitrator_set_preimage_resolver( cache.put(cache_key, true); } else { drop(cache); - match CACHE_PREIMAGE_REHASH_CHECK.try_write() { - Ok(mut cache) => { - let _ = cache.pop(&cache_key); - cache.put(cache_key.clone(), true); - } - Err(_) => {} + if let Ok(mut cache) = CACHE_PREIMAGE_REHASH_CHECK.try_write() { + let _ = cache.pop(&cache_key); + cache.put(cache_key, true); }; } Some(data)