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

Function ok_or_else

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

Source from the content-addressed store, hash-verified

846
847 #[test]
848 fn ok_or_else() {
849 assert_eq!(NONE.ok_or_else(|| Error), Err(Error));
850 assert_eq!(SOME.ok_or_else(|| Error), Ok(VALUE));
851 }
852
853 #[test]
854 fn or() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected