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

Function find_raw_object_hex

atomic-cli/tests/it/git_import_cb9c_test.rs:2756–2769  ·  view source on GitHub ↗
(value: &serde_json::Value, expected: &str)

Source from the content-addressed store, hash-verified

2754
2755#[allow(dead_code)]
2756fn find_raw_object_hex(value: &serde_json::Value, expected: &str) -> bool {
2757 match value {
2758 serde_json::Value::String(text) => {
2759 text.len() >= expected.len() && text.to_lowercase().contains(&expected.to_lowercase())
2760 }
2761 serde_json::Value::Array(items) => {
2762 items.iter().any(|item| find_raw_object_hex(item, expected))
2763 }
2764 serde_json::Value::Object(map) => {
2765 map.values().any(|item| find_raw_object_hex(item, expected))
2766 }
2767 _ => false,
2768 }
2769}
2770
2771fn find_raw_object_hex_value(value: &serde_json::Value) -> Option<String> {
2772 match value {

Callers

nothing calls this directly

Calls 3

lenMethod · 0.45
containsMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected