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

Method from

atomic-repository/src/error.rs:525–538  ·  view source on GitHub ↗
(error: PristineError)

Source from the content-addressed store, hash-verified

523
524impl From<PristineError> for RepositoryError {
525 fn from(error: PristineError) -> Self {
526 if matches!(&error, PristineError::Database(inner)
527 if matches!(inner.as_ref(), redb::DatabaseError::DatabaseAlreadyOpen))
528 {
529 Self::DatabaseBusy
530 } else {
531 match error {
532 source @ PristineError::UnsupportedRequiredCapabilities { .. } => {
533 Self::UnsupportedRequiredCapabilities { source }
534 }
535 other => Self::Database(other.to_string()),
536 }
537 }
538 }
539}
540
541impl From<serde_json::Error> for RepositoryError {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected