MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / file

Function file

atomic-cli/tests/review_comparison.rs:54–61  ·  view source on GitHub ↗
(report: &'a Value, path: &str)

Source from the content-addressed store, hash-verified

52 serde_json::from_slice(&output.stdout).unwrap()
53}
54fn file<'a>(report: &'a Value, path: &str) -> &'a Value {
55 report["view_comparison"]["files"]
56 .as_array()
57 .unwrap()
58 .iter()
59 .find(|f| f["path"] == path)
60 .unwrap_or_else(|| panic!("Missing {path} in {}", report["view_comparison"]["files"]))
61}
62fn states(report: &Value, path: &str) -> BTreeSet<String> {
63 file(report, path)["finding_states"]
64 .as_object()

Calls 2

iterMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected