Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RustCrypto/utils
/ ok_or
Function
ok_or
ctutils/src/ct_option.rs:842–845 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
840
841
#[test]
842
fn ok_or() {
843
assert_eq!(NONE.ok_or(Error), Err(Error));
844
assert_eq!(SOME.ok_or(Error), Ok(VALUE));
845
}
846
847
#[test]
848
fn ok_or_else() {
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected