MCPcopy Index your code
hub / github.com/RustPython/RustPython / expect_unchecked

Function expect_unchecked

crates/vm/src/frame.rs:9709–9715  ·  view source on GitHub ↗
(optional: Option<T>, err_msg: &'static str)

Source from the content-addressed store, hash-verified

9707}
9708
9709fn expect_unchecked<T: fmt::Debug>(optional: Option<T>, err_msg: &'static str) -> T {
9710 if cfg!(debug_assertions) {
9711 optional.expect(err_msg)
9712 } else {
9713 unsafe { optional.unwrap_unchecked() }
9714 }
9715}

Callers 4

execute_instructionMethod · 0.85
pop_stackrefMethod · 0.85
pop_multipleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected