Skip to content

Commit 81277a5

Browse files
committed
Replace unsafe unwrap with expect call
1 parent 5c826b5 commit 81277a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/function/execute.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ where
183183
debug_assert!(memo.may_be_provisional());
184184
memo.value.as_ref()
185185
};
186-
// SAFETY: The `LRU` does not run mid-execution, so the value remains filled
187-
let last_provisional_value = unsafe { last_provisional_value.unwrap_unchecked() };
186+
187+
let last_provisional_value = last_provisional_value.expect(
188+
"`fetch_cold_cycle` should have inserted a provisional memo with Cycle::initial",
189+
);
188190
crate::tracing::debug!(
189191
"{database_key_index:?}: execute: \
190192
I am a cycle head, comparing last provisional value with new value"

0 commit comments

Comments
 (0)