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

Function take_option_ref

atomic-core/src/pristine/ref_mapping.rs:392–398  ·  view source on GitHub ↗
(take: &mut Take<'a>)

Source from the content-addressed store, hash-verified

390}
391
392fn take_option_ref<'a>(take: &mut Take<'a>) -> Result<Option<String>, PristineError> {
393 match take(1)?[0] {
394 0 => Ok(None),
395 1 => Some(take_string(take)).transpose(),
396 _ => Err(decode_error()),
397 }
398}
399
400fn decode_error() -> PristineError {
401 PristineError::Serialization {

Callers 1

decodeMethod · 0.85

Calls 2

take_stringFunction · 0.85
decode_errorFunction · 0.85

Tested by

no test coverage detected