From 1902eb15cf81961e013a5c7b8b03b2f7a5276443 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sun, 23 Feb 2025 10:11:07 -0800 Subject: [PATCH] Fix clippy::from_over_into --- src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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), }