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

Function and_then

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

Source from the content-addressed store, hash-verified

766
767 #[test]
768 fn and_then() {
769 assert!(NONE.and_then(|_| NONE).is_none().to_bool());
770 assert!(NONE.and_then(|_| SOME).is_none().to_bool());
771
772 let ret = SOME.and_then(|value| {
773 assert_eq!(VALUE, value);
774 OTHER
775 });
776 assert!(ret.ct_eq(&OTHER).to_bool());
777 }
778
779 #[test]
780 fn filter() {

Callers

nothing calls this directly

Calls 1

and_thenMethod · 0.80

Tested by

no test coverage detected