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

Function has_disabled_entry

atomic-cli/src/commands/diagnostics/collect.rs:1015–1025  ·  view source on GitHub ↗
(value: &serde_json::Value)

Source from the content-addressed store, hash-verified

1013}
1014
1015fn has_disabled_entry(value: &serde_json::Value) -> bool {
1016 match value {
1017 serde_json::Value::Object(object) => {
1018 object.get("disabled") == Some(&serde_json::Value::Bool(true))
1019 || object.get("enabled") == Some(&serde_json::Value::Bool(false))
1020 || object.values().any(has_disabled_entry)
1021 }
1022 serde_json::Value::Array(values) => values.iter().any(has_disabled_entry),
1023 _ => false,
1024 }
1025}
1026
1027/// Describe a receipt's source without leaking credentials or the user's
1028/// home directory.

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
iterMethod · 0.45

Tested by

no test coverage detected