MCPcopy Create free account
hub / github.com/hashintel/hash / panic_on_unused_with_defuse

Function panic_on_unused_with_defuse

libs/error-stack/src/sink.rs:565–580  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

563
564 #[test]
565 fn panic_on_unused_with_defuse() {
566 fn sink() -> Result<(), Report<[TestError]>> {
567 let mut sink = ReportSink::new_armed();
568
569 sink.append(Report::new(TestError(0)));
570
571 sink?;
572 Ok(())
573 }
574
575 let report = sink().expect_err("should have failed");
576
577 let contexts: BTreeSet<_> = report.current_contexts().collect();
578 assert_eq!(contexts.len(), 1);
579 assert!(contexts.contains(&TestError(0)));
580 }
581
582 #[test]
583 fn finish() {

Callers

nothing calls this directly

Calls 3

sinkFunction · 0.85
collectMethod · 0.80
current_contextsMethod · 0.80

Tested by

no test coverage detected