2024-05-18 11:41:18 +01:00
|
|
|
#[derive(Debug, derive_more::Display)]
|
2024-05-03 17:50:50 +01:00
|
|
|
pub enum Error {
|
2024-05-18 11:41:18 +01:00
|
|
|
UnableToOpenRepo(String),
|
2024-05-03 17:50:50 +01:00
|
|
|
NoFetchRemoteFound,
|
2024-05-18 11:41:18 +01:00
|
|
|
Connect(String),
|
2024-05-03 17:50:50 +01:00
|
|
|
Fetch(String),
|
2024-05-18 11:41:18 +01:00
|
|
|
Lock,
|
2024-05-03 17:50:50 +01:00
|
|
|
}
|
|
|
|
impl std::error::Error for Error {}
|
2024-05-19 20:02:06 +01:00
|
|
|
|
|
|
|
mod gix_error {
|
|
|
|
#![cfg(not(tarpaulin_include))] // third-party library errors
|
|
|
|
use super::Error;
|
|
|
|
|
|
|
|
impl From<gix::remote::connect::Error> for Error {
|
|
|
|
fn from(gix_error: gix::remote::connect::Error) -> Self {
|
|
|
|
Self::Connect(gix_error.to_string())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|