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

Method select_u16

ctutils/src/choice.rs:360–362  ·  view source on GitHub ↗
(self, a: u16, b: u16)

Source from the content-addressed store, hash-verified

358 #[inline]
359 #[must_use]
360 pub const fn select_u16(self, a: u16, b: u16) -> u16 {
361 a ^ (self.to_u16_mask() & (a ^ b))
362 }
363
364 /// `const fn` helper: return `b` if `self` is [`Choice::TRUE`], otherwise return `a`.
365 ///

Callers

nothing calls this directly

Calls 1

to_u16_maskMethod · 0.80

Tested by

no test coverage detected