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

Method select_i64

ctutils/src/choice.rs:313–316  ·  view source on GitHub ↗
(self, a: i64, b: i64)

Source from the content-addressed store, hash-verified

311 #[must_use]
312 #[allow(clippy::cast_possible_wrap, clippy::cast_sign_loss)]
313 pub const fn select_i64(self, a: i64, b: i64) -> i64 {
314 // TODO(tarcieri): use `cast_signed` when MSRV is 1.87
315 self.select_u64(a as u64, b as u64) as i64
316 }
317
318 /// `const fn` helper: return `b` if `self` is [`Choice::TRUE`], otherwise return `a`.
319 ///

Callers

nothing calls this directly

Calls 1

select_u64Method · 0.80

Tested by

no test coverage detected