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

Function finish_with_value

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

Source from the content-addressed store, hash-verified

649
650 #[test]
651 fn finish_with_value() {
652 let mut sink = ReportSink::new();
653
654 sink.append(Report::new(TestError(0)));
655 sink.append(Report::new(TestError(1)));
656
657 let report = sink.finish_ok(8).expect_err("should have failed");
658
659 let contexts: BTreeSet<_> = report.current_contexts().collect();
660 assert_eq!(contexts.len(), 2);
661 assert!(contexts.contains(&TestError(0)));
662 assert!(contexts.contains(&TestError(1)));
663 }
664
665 #[test]
666 fn finish_with_value_ok() {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected