MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / fallible_io

Function fallible_io

atomic-core/src/pristine/error.rs:891–893  ·  view source on GitHub ↗

Simulate the ? operator flow: redb/io errors -> PristineResult

()

Source from the content-addressed store, hash-verified

889 fn from_conversions_round_trip_through_question_mark() {
890 // Simulate the ? operator flow: redb/io errors -> PristineResult
891 fn fallible_io() -> PristineResult<()> {
892 Err(std::io::Error::new(std::io::ErrorKind::NotFound, "gone"))?
893 }
894
895 let result = fallible_io();
896 assert!(matches!(result, Err(PristineError::Io(_))));

Calls

no outgoing calls