MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / format_setting_value

Function format_setting_value

crates/openshell-sandbox/src/lib.rs:1941–1950  ·  view source on GitHub ↗

Format an `EffectiveSetting` value for log display.

(es: &openshell_core::proto::EffectiveSetting)

Source from the content-addressed store, hash-verified

1939
1940/// Format an `EffectiveSetting` value for log display.
1941fn format_setting_value(es: &openshell_core::proto::EffectiveSetting) -> String {
1942 use openshell_core::proto::setting_value;
1943 match es.value.as_ref().and_then(|sv| sv.value.as_ref()) {
1944 None => "<unset>".to_string(),
1945 Some(setting_value::Value::StringValue(v)) => v.clone(),
1946 Some(setting_value::Value::BoolValue(v)) => v.to_string(),
1947 Some(setting_value::Value::IntValue(v)) => v.to_string(),
1948 Some(setting_value::Value::BytesValue(_)) => "<bytes>".to_string(),
1949 }
1950}
1951
1952#[cfg(test)]
1953#[allow(

Callers 1

log_setting_changesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected