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

Method from

atomic-repository/src/content_search.rs:690–701  ·  view source on GitHub ↗
(err: IndexError)

Source from the content-addressed store, hash-verified

688
689impl From<IndexError> for ContentSearchError {
690 fn from(err: IndexError) -> Self {
691 match err {
692 IndexError::Io(ref e) if e.kind() == std::io::ErrorKind::NotFound => {
693 ContentSearchError::IndexNotFound
694 }
695 IndexError::IndexNotFound(_) => ContentSearchError::IndexNotFound,
696 IndexError::InvalidPattern(p) => ContentSearchError::InvalidPattern(p),
697 IndexError::CorruptIndex(msg) => ContentSearchError::CorruptIndex(msg),
698 IndexError::LockConflict(_) => ContentSearchError::LockConflict,
699 other => ContentSearchError::Index(other.to_string()),
700 }
701 }
702}
703
704#[cfg(test)]

Callers

nothing calls this directly

Calls 1

kindMethod · 0.45

Tested by

no test coverage detected