repo: remove unused error type

This commit is contained in:
Martin von Zweigbergk 2022-10-27 08:51:21 -07:00 committed by Martin von Zweigbergk
parent 2b64e52b4d
commit 597e10103f

View file

@ -43,25 +43,6 @@ use crate::transaction::Transaction;
use crate::view::{RefName, View};
use crate::{backend, op_store};
#[derive(Debug, Error, PartialEq, Eq)]
pub enum RepoError {
#[error("Object not found")]
NotFound,
#[error("Error: {0}")]
Other(String),
}
impl From<BackendError> for RepoError {
fn from(err: BackendError) -> Self {
match err {
BackendError::NotFound => RepoError::NotFound,
BackendError::Other(description) => RepoError::Other(description),
}
}
}
pub type RepoResult<T> = Result<T, RepoError>;
// TODO: Should we implement From<&ReadonlyRepo> and From<&MutableRepo> for
// RepoRef?
#[derive(Clone, Copy)]