refactor(git): reporitory errors don't leak implementation
This commit is contained in:
parent
155497c97f
commit
70100f6dc5
1 changed files with 6 additions and 6 deletions
|
@ -67,23 +67,23 @@ pub enum Error {
|
|||
Wait(std::io::Error),
|
||||
Spawn(std::io::Error),
|
||||
Validation(String),
|
||||
GixClone(Box<gix::clone::Error>),
|
||||
GixOpen(Box<gix::open::Error>),
|
||||
GixFetch(Box<gix::clone::fetch::Error>),
|
||||
Clone(String),
|
||||
Open(String),
|
||||
Fetch(String),
|
||||
}
|
||||
impl std::error::Error for Error {}
|
||||
impl From<gix::clone::Error> for Error {
|
||||
fn from(value: gix::clone::Error) -> Self {
|
||||
Self::GixClone(Box::new(value))
|
||||
Self::Clone(value.to_string())
|
||||
}
|
||||
}
|
||||
impl From<gix::open::Error> for Error {
|
||||
fn from(value: gix::open::Error) -> Self {
|
||||
Self::GixOpen(Box::new(value))
|
||||
Self::Open(value.to_string())
|
||||
}
|
||||
}
|
||||
impl From<gix::clone::fetch::Error> for Error {
|
||||
fn from(value: gix::clone::fetch::Error) -> Self {
|
||||
Self::GixFetch(Box::new(value))
|
||||
Self::Fetch(value.to_string())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue