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

Method or

ctutils/src/ct_option.rs:393–401  ·  view source on GitHub ↗
(self, optb: CtOption<T>)

Source from the content-addressed store, hash-verified

391 #[inline]
392 #[must_use]
393 pub fn or(self, optb: CtOption<T>) -> CtOption<T>
394 where
395 T: CtSelect,
396 {
397 CtOption {
398 value: self.value.ct_select(&optb.value, self.is_none()),
399 is_some: self.is_some | optb.is_some,
400 }
401 }
402
403 /// Obtain a copy of the inner value without first checking that `self.is_some()` is
404 /// [`Choice::TRUE`].

Callers

nothing calls this directly

Calls 2

is_noneMethod · 0.80
ct_selectMethod · 0.45

Tested by

no test coverage detected