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

Function io_error_preserves_source_chain

atomic-core/src/pristine/error.rs:805–812  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

803
804 #[test]
805 fn io_error_preserves_source_chain() {
806 let original = std::io::Error::new(std::io::ErrorKind::PermissionDenied, "access denied");
807 let err: PristineError = original.into();
808
809 // The source chain should be accessible for logging/debugging.
810 let source = err.source().expect("Io variant should expose source");
811 assert!(source.to_string().contains("access denied"));
812 }
813
814 #[test]
815 fn custom_variants_have_no_source() {

Callers

nothing calls this directly

Calls 1

sourceMethod · 0.45

Tested by

no test coverage detected