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

Function hook_provider

libs/error-stack/tests/test_debug.rs:581–597  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

579 #[test]
580 #[cfg(nightly)]
581 fn hook_provider() {
582 let _guard = prepare(false);
583
584 let report = create_report().change_context(ContextD {
585 code: 420,
586 reason: "Invalid User Input",
587 });
588
589 Report::install_debug_hook::<usize>(|value, context| {
590 context.push_body(format!("usize: {value}"));
591 });
592 Report::install_debug_hook::<&'static str>(|value, context| {
593 context.push_body(format!("&'static str: {value}"));
594 });
595
596 assert_snapshot!(format!("{report:?}"));
597 }
598
599 #[test]
600 fn charset_ascii() {

Callers

nothing calls this directly

Calls 4

push_bodyMethod · 0.80
prepareFunction · 0.70
create_reportFunction · 0.70
change_contextMethod · 0.45

Tested by

no test coverage detected