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

Function validate_token

atomic-repository/src/change_source/watchman.rs:128–133  ·  view source on GitHub ↗
(token: Option<&ChangeSourceToken>)

Source from the content-addressed store, hash-verified

126}
127
128fn validate_token(token: Option<&ChangeSourceToken>) -> Result<(), ChangeSourceError> {
129 if token.is_some_and(|token| !token.0.starts_with(TOKEN_PREFIX)) {
130 return Err(ChangeSourceError::UnknownToken);
131 }
132 Ok(())
133}
134
135fn parse_response(
136 bytes: &[u8],

Callers 1

changesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected