MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / validate_prefix

Function validate_prefix

crates/opencode-core/src/id.rs:98–100  ·  view source on GitHub ↗
(id: &str, expected: Prefix)

Source from the content-addressed store, hash-verified

96}
97
98pub fn validate_prefix(id: &str, expected: Prefix) -> bool {
99 id.starts_with(expected.as_str())
100}
101
102#[cfg(test)]
103mod tests {

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected