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

Function build

libs/error-stack/tests/test_iter.rs:47–66  ·  view source on GitHub ↗

Builds the following tree: ```text A G / \ | B E H / \ | C D F ``` which will result in this report: ```text A ╰┬▶ B │ ╰┬▶ C │ ╰▶ D ╰▶ E ╰─▶ F G ╰─▶ H ```

()

Source from the content-addressed store, hash-verified

45/// ╰─▶ H
46/// ```
47fn build() -> Report<[Char]> {
48 let mut report_c = Char('C').into_report().expand();
49 let report_d = Char('D').into_report();
50
51 report_c.push(report_d);
52 let mut report_b = report_c.change_context(Char('B')).expand();
53
54 let report_f = Char('F').into_report();
55 let report_e = report_f.change_context(Char('E'));
56
57 report_b.push(report_e);
58
59 let mut report_a = report_b.change_context(Char('A')).expand();
60
61 let report_h = Char('H').into_report();
62 let report_g = report_h.change_context(Char('G'));
63
64 report_a.push(report_g);
65 report_a
66}
67
68/// Try to verify if the topological sorting is working, by trying to verify that:
69///

Callers 3

iterFunction · 0.70
iter_mutFunction · 0.70
iter_mut_breakFunction · 0.70

Calls 5

CharClass · 0.85
expandMethod · 0.80
pushMethod · 0.65
into_reportMethod · 0.45
change_contextMethod · 0.45

Tested by

no test coverage detected