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

Method into_option_copied

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

Source from the content-addressed store, hash-verified

218 /// </div>
219 #[inline]
220 pub const fn into_option_copied(self) -> Option<T>
221 where
222 T: Copy,
223 {
224 if self.is_some.to_bool() {
225 Some(self.value)
226 } else {
227 None
228 }
229 }
230
231 /// Returns [`Choice::TRUE`] if the option is the equivalent of a `Some`.
232 #[inline]

Callers

nothing calls this directly

Calls 1

to_boolMethod · 0.80

Tested by

no test coverage detected