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

Method from_u16_lt

ctutils/src/choice.rs:170–180  ·  view source on GitHub ↗
(x: u16, y: u16)

Source from the content-addressed store, hash-verified

168 #[inline]
169 #[must_use]
170 pub const fn from_u16_lt(x: u16, y: u16) -> Self {
171 // Use the same hardening as the word-sized comparison on Thumb-1.
172 #[cfg(all(target_arch = "arm", not(target_has_atomic = "ptr")))]
173 {
174 Self::from_u32_lt(x as u32, y as u32)
175 }
176 #[cfg(not(all(target_arch = "arm", not(target_has_atomic = "ptr"))))]
177 {
178 Self::from_u16_lsb(crate::primitives::bitlt!(x, y, u16::BITS))
179 }
180 }
181
182 /// Returns [`Choice::TRUE`] if `value != 0`, and [`Choice::FALSE`] otherwise.
183 #[inline]

Callers

nothing calls this directly

Calls 2

from_u32_ltFunction · 0.85
from_u16_lsbFunction · 0.85

Tested by

no test coverage detected