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

Function finish_default

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

Source from the content-addressed store, hash-verified

626
627 #[test]
628 fn finish_default() {
629 let mut sink = ReportSink::new();
630
631 sink.append(Report::new(TestError(0)));
632 sink.append(Report::new(TestError(1)));
633
634 let report = sink.finish_default::<u8>().expect_err("should have failed");
635
636 let contexts: BTreeSet<_> = report.current_contexts().collect();
637 assert_eq!(contexts.len(), 2);
638 assert!(contexts.contains(&TestError(0)));
639 assert!(contexts.contains(&TestError(1)));
640 }
641
642 #[test]
643 fn finish_default_ok() {

Callers

nothing calls this directly

Calls 4

collectMethod · 0.80
current_contextsMethod · 0.80
TestErrorClass · 0.70
appendMethod · 0.65

Tested by

no test coverage detected