From eeb8017439227e059a0d88989c2379017d166e9c Mon Sep 17 00:00:00 2001 From: beer-1 Date: Fri, 1 Nov 2024 16:42:24 +0900 Subject: [PATCH] fix lint --- crates/storage/src/script_cache.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/storage/src/script_cache.rs b/crates/storage/src/script_cache.rs index 9e0c0e60..bcc0f505 100644 --- a/crates/storage/src/script_cache.rs +++ b/crates/storage/src/script_cache.rs @@ -80,9 +80,9 @@ impl InitiaScriptCache { } }; - if new_script.is_some() { + if let Some(new_script) = new_script { script_cache - .put_with_weight(key, ScriptWrapper::new(new_script.unwrap(), allocated_size)) + .put_with_weight(key, ScriptWrapper::new(new_script, allocated_size)) .unwrap_or_else(|_| { eprintln!("WARNING: failed to insert script into cache; cache capacity might be too small"); None