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

Method unwrap_or_default

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

Source from the content-addressed store, hash-verified

466 #[inline]
467 #[must_use]
468 pub fn unwrap_or_default(self) -> T
469 where
470 T: CtSelect + Default,
471 {
472 self.unwrap_or(T::default())
473 }
474
475 /// Returns an "is some" [`CtOption`] with the contained value from either `self` or `optb` in
476 /// the event exactly one of them has `self.is_some()` set to [`Choice::TRUE`], or else returns

Callers

nothing calls this directly

Calls 2

defaultFunction · 0.85
unwrap_orMethod · 0.80

Tested by

no test coverage detected