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

Method select_u32

ctutils/src/choice.rs:344–346  ·  view source on GitHub ↗
(self, a: u32, b: u32)

Source from the content-addressed store, hash-verified

342 #[inline]
343 #[must_use]
344 pub const fn select_u32(self, a: u32, b: u32) -> u32 {
345 a ^ (self.to_u32_mask() & (a ^ b))
346 }
347
348 /// `const fn` helper: return `b` if `self` is [`Choice::TRUE`], otherwise return `a`.
349 ///

Callers

nothing calls this directly

Calls 1

to_u32_maskMethod · 0.80

Tested by

no test coverage detected