MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / filter

Function filter

crates/opencode-util/src/util.rs:14–20  ·  view source on GitHub ↗
(pattern: &str, items: &'a [&str])

Source from the content-addressed store, hash-verified

12 }
13
14 pub fn filter<'a>(pattern: &str, items: &'a [&str]) -> Vec<&'a str> {
15 items
16 .iter()
17 .filter(|s| matches(pattern, s))
18 .copied()
19 .collect()
20 }
21}
22
23pub mod color {

Callers

nothing calls this directly

Calls 2

matchesFunction · 0.85
filterMethod · 0.45

Tested by

no test coverage detected