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

Function from_u16_nz

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

Source from the content-addressed store, hash-verified

781
782 #[test]
783 fn from_u16_nz() {
784 assert!(Choice::from_u16_nz(0).eq(Choice::FALSE).to_bool());
785 assert!(Choice::from_u16_nz(1).eq(Choice::TRUE).to_bool());
786 assert!(Choice::from_u16_nz(2).eq(Choice::TRUE).to_bool());
787 }
788
789 #[test]
790 fn from_u32_eq() {

Callers 1

from_u16_eqMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected