mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 02:04:19 +00:00
refactor: use #[from] on error alternative
This commit is contained in:
parent
8a1b21ff73
commit
8b644846a4
1 changed files with 1 additions and 7 deletions
|
@ -28,13 +28,7 @@ pub enum OpHeadResolutionError<E> {
|
||||||
#[error("Operation log has no heads")]
|
#[error("Operation log has no heads")]
|
||||||
NoHeads,
|
NoHeads,
|
||||||
#[error("Op resolution error: {0}")]
|
#[error("Op resolution error: {0}")]
|
||||||
Err(E),
|
Err(#[from] E),
|
||||||
}
|
|
||||||
|
|
||||||
impl<E> From<E> for OpHeadResolutionError<E> {
|
|
||||||
fn from(e: E) -> Self {
|
|
||||||
OpHeadResolutionError::Err(e)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait OpHeadsStoreLock<'a> {
|
pub trait OpHeadsStoreLock<'a> {
|
||||||
|
|
Loading…
Reference in a new issue