Skip to content

Commit

Permalink
fix clippy recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Mar 28, 2024
1 parent 397f368 commit 21c6632
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arbitrator/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 21c6632

Please sign in to comment.