Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
98
pub fn validate_prefix(id: &str, expected: Prefix) -> bool {
99
id.starts_with(expected.as_str())
100
}
101
102
#[cfg(test)]
103
mod tests {
Callers
nothing calls this directly
Calls
1
as_str
Method · 0.45
Tested by
no test coverage detected