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

Function read_nonempty_trimmed

crates/openshell-bootstrap/src/metadata.rs:252–256  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

250 }
251}
252fn read_nonempty_trimmed(path: &Path) -> Option<String> {
253 let contents = std::fs::read_to_string(path).ok()?;
254 let value = contents.trim();
255 (!value.is_empty()).then(|| value.to_string())
256}
257
258/// Load the per-user active gateway name from persistent storage.
259///

Callers 1

read_gateway_nameFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected