Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Nov 1, 2024
1 parent a81f7f0 commit eeb8017
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/storage/src/script_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eeb8017

Please sign in to comment.