(error: PristineError)
| 523 | |
| 524 | impl 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 | |
| 541 | impl From<serde_json::Error> for RepositoryError { |
nothing calls this directly
no outgoing calls
no test coverage detected