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:476–483  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

474
475 #[test]
476 fn io_error_preserves_source_chain() {
477 let original = std::io::Error::new(std::io::ErrorKind::PermissionDenied, "access denied");
478 let err: PristineError = original.into();
479
480 // The source chain should be accessible for logging/debugging.
481 let source = err.source().expect("Io variant should expose source");
482 assert!(source.to_string().contains("access denied"));
483 }
484
485 #[test]
486 fn custom_variants_have_no_source() {

Callers

nothing calls this directly

Calls 1

sourceMethod · 0.45

Tested by

no test coverage detected