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

Function ct_select

ctutils/src/ct_option.rs:716–721  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

714
715 #[test]
716 fn ct_select() {
717 assert!(NONE.ct_select(&SOME, Choice::FALSE).is_none().to_bool());
718 assert!(NONE.ct_select(&SOME, Choice::TRUE).ct_eq(&SOME).to_bool());
719 assert!(SOME.ct_select(&NONE, Choice::FALSE).ct_eq(&SOME).to_bool());
720 assert!(SOME.ct_select(&NONE, Choice::TRUE).is_none().to_bool());
721 }
722
723 #[test]
724 fn default() {

Callers 1

conditional_selectMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected