MCPcopy Create free account
hub / github.com/RustCrypto/utils / unwrap

Method unwrap

ctutils/src/ct_option.rs:442–448  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

440 #[must_use]
441 #[track_caller]
442 pub fn unwrap(self) -> T {
443 assert!(
444 self.is_some.to_bool(),
445 "called `CtOption::unwrap()` on a value with `is_some` set to `Choice::FALSE`"
446 );
447 self.value
448 }
449
450 /// Return the contained value in the event `self.is_some()` is [`Choice::TRUE`], or if not,
451 /// uses a provided default.

Callers 15

keccak_testFunction · 0.45
test_async_readFunction · 0.45
test_async_writeFunction · 0.45
unwrap_noneFunction · 0.45
test_deriveFunction · 0.45
arc_unsized_zeroizingFunction · 0.45
reserved_invalid_lengthsFunction · 0.45
hash_to_endMethod · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by 9

keccak_testFunction · 0.36
test_async_readFunction · 0.36
test_async_writeFunction · 0.36
test_deriveFunction · 0.36
arc_unsized_zeroizingFunction · 0.36
reserved_invalid_lengthsFunction · 0.36