diff --git a/src/lib.rs b/src/lib.rs index 9ad4a8f..5dbe668 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1129,10 +1129,9 @@ impl From> for Either { } /// Convert from `Either` to `Result` with `Right => Ok` and `Left => Err`. -#[allow(clippy::from_over_into)] // From requires RFC 2451, Rust 1.41 -impl Into> for Either { - fn into(self) -> Result { - match self { +impl From> for Result { + fn from(val: Either) -> Self { + match val { Left(l) => Err(l), Right(r) => Ok(r), }