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

Function from_u32_nz

ctutils/src/choice.rs:820–824  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

818
819 #[test]
820 fn from_u32_nz() {
821 assert!(Choice::from_u32_nz(0).eq(Choice::FALSE).to_bool());
822 assert!(Choice::from_u32_nz(1).eq(Choice::TRUE).to_bool());
823 assert!(Choice::from_u32_nz(2).eq(Choice::TRUE).to_bool());
824 }
825
826 #[test]
827 fn from_u64_eq() {

Callers 4

leading_zeros_u64Function · 0.85
trailing_zeros_u64Function · 0.85
leading_zeros_u32_softFunction · 0.85
from_u32_eqMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected