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

Method select_u64

ctutils/src/choice.rs:380–382  ·  view source on GitHub ↗
(self, a: u64, b: u64)

Source from the content-addressed store, hash-verified

378 #[inline]
379 #[must_use]
380 pub const fn select_u64(self, a: u64, b: u64) -> u64 {
381 a ^ (self.to_u64_mask() & (a ^ b))
382 }
383
384 /// `const fn` helper: return `b` if `self` is [`Choice::TRUE`], otherwise return `a`.
385 ///

Callers 1

select_i64Method · 0.80

Calls 1

to_u64_maskMethod · 0.80

Tested by

no test coverage detected