ok/jj
1
0
Fork 0
forked from mirrors/jj

refactor: use #[from] on error alternative

This commit is contained in:
Samuel Tardieu 2023-01-21 00:22:24 +01:00
parent 8a1b21ff73
commit 8b644846a4

View file

@ -28,13 +28,7 @@ pub enum OpHeadResolutionError<E> {
#[error("Operation log has no heads")]
NoHeads,
#[error("Op resolution error: {0}")]
Err(E),
}
impl<E> From<E> for OpHeadResolutionError<E> {
fn from(e: E) -> Self {
OpHeadResolutionError::Err(e)
}
Err(#[from] E),
}
pub trait OpHeadsStoreLock<'a> {