31 lines
606 B
Rust
31 lines
606 B
Rust
//
|
|
pub type Result<T> = core::result::Result<T, Error>;
|
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
pub enum Error {
|
|
#[error("unable to open repo: {0}")]
|
|
UnableToOpenRepo(String),
|
|
|
|
#[error("no remote found")]
|
|
NoFetchRemoteFound,
|
|
|
|
#[error("remote connect: {0}")]
|
|
Connect(String),
|
|
|
|
#[error("prepare: {0}")]
|
|
Prepare(String),
|
|
|
|
#[error("receive: {0}")]
|
|
Receive(String),
|
|
|
|
#[error("lock")]
|
|
Lock,
|
|
|
|
#[cfg(test)]
|
|
#[error("expected failure in test")]
|
|
TestFailureExpected,
|
|
|
|
#[cfg(test)]
|
|
#[error("test")]
|
|
TestResult(#[from] Box<dyn std::error::Error>),
|
|
}
|