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

Function or_all

atomic-cli/src/commands/identity/agent/show.rs:148–154  ·  view source on GitHub ↗

An empty pattern list means unrestricted, which is worth saying explicitly rather than rendering as a blank the reader has to interpret.

(items: &[String])

Source from the content-addressed store, hash-verified

146/// An empty pattern list means unrestricted, which is worth saying explicitly
147/// rather than rendering as a blank the reader has to interpret.
148fn or_all(items: &[String]) -> String {
149 if items.is_empty() {
150 "(all)".to_string()
151 } else {
152 items.join(", ")
153 }
154}
155
156#[cfg(test)]
157mod tests {

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected