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

Function finish_with

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

Source from the content-addressed store, hash-verified

603
604 #[test]
605 fn finish_with() {
606 let mut sink = ReportSink::new();
607
608 sink.append(Report::new(TestError(0)));
609 sink.append(Report::new(TestError(1)));
610
611 let report = sink.finish_with(|| 8).expect_err("should have failed");
612
613 let contexts: BTreeSet<_> = report.current_contexts().collect();
614 assert_eq!(contexts.len(), 2);
615 assert!(contexts.contains(&TestError(0)));
616 assert!(contexts.contains(&TestError(1)));
617 }
618
619 #[test]
620 fn finish_with_ok() {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected