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

Function attach_result

libs/error-stack/tests/test_change_context.rs:65–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63
64#[test]
65fn attach_result() {
66 let error = create_error()
67 .change_context(ContextA(0))
68 .attach_opaque(AttachmentA)
69 .change_context_lazy(|| ContextB(0))
70 .attach_opaque_with(|| AttachmentB);
71
72 let report = error.expect_err("Not an error");
73 test_messages(&report);
74 test_kinds(&report);
75}
76
77#[test]
78fn attach_future() {

Callers

nothing calls this directly

Calls 9

create_errorFunction · 0.85
ContextAClass · 0.85
ContextBClass · 0.85
test_messagesFunction · 0.70
test_kindsFunction · 0.70
attach_opaque_withMethod · 0.45
change_context_lazyMethod · 0.45
attach_opaqueMethod · 0.45
change_contextMethod · 0.45

Tested by

no test coverage detected