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

Function map_or

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

Source from the content-addressed store, hash-verified

827
828 #[test]
829 fn map_or() {
830 let example = 52;
831 assert_eq!(NONE.map_or(example, |value| value + 1), example);
832 assert_eq!(SOME.map_or(example, |value| value + 1), VALUE + 1);
833 }
834
835 #[test]
836 fn map_or_default() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected