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

Function find

atomic-cli/tests/it/diagnostics_integration_test.rs:1203–1209  ·  view source on GitHub ↗
(list: &'v Value, key: &str, name: &str)

Source from the content-addressed store, hash-verified

1201}
1202
1203fn find<'v>(list: &'v Value, key: &str, name: &str) -> &'v Value {
1204 list.as_array()
1205 .unwrap()
1206 .iter()
1207 .find(|entry| entry[key] == name)
1208 .unwrap_or_else(|| panic!("{name} listed in {list}"))
1209}
1210
1211#[test]
1212fn outside_a_workspace_the_report_still_succeeds_with_what_it_can_read() {

Calls 2

iterMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected