mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-08 21:48:08 +00:00
repo: remove unused error type
This commit is contained in:
parent
2b64e52b4d
commit
597e10103f
1 changed files with 0 additions and 19 deletions
|
@ -43,25 +43,6 @@ use crate::transaction::Transaction;
|
||||||
use crate::view::{RefName, View};
|
use crate::view::{RefName, View};
|
||||||
use crate::{backend, op_store};
|
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
|
// TODO: Should we implement From<&ReadonlyRepo> and From<&MutableRepo> for
|
||||||
// RepoRef?
|
// RepoRef?
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
|
|
Loading…
Reference in a new issue