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

Function from_u8_lt

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

Source from the content-addressed store, hash-verified

736
737 #[test]
738 fn from_u8_lt() {
739 assert!(Choice::from_u8_lt(0, 0).eq(Choice::FALSE).to_bool());
740 assert!(Choice::from_u8_lt(1, 0).eq(Choice::FALSE).to_bool());
741 assert!(Choice::from_u8_lt(1, 1).eq(Choice::FALSE).to_bool());
742 assert!(Choice::from_u8_lt(1, 2).eq(Choice::TRUE).to_bool());
743 }
744
745 #[test]
746 fn from_u8_nz() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected