From cf7fc7fc6acb1eeb602230cf071569415ef012e0 Mon Sep 17 00:00:00 2001 From: Philippe-Cholet Date: Fri, 12 Jan 2024 09:11:51 +0100 Subject: [PATCH] Either or both: `impl From` implies `impl Into` I removed the clippy lint, commit, run `clippy --fix`, squash. --- src/either_or_both.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/either_or_both.rs b/src/either_or_both.rs index d13763441..b7a7fc141 100644 --- a/src/either_or_both.rs +++ b/src/either_or_both.rs @@ -494,10 +494,9 @@ impl EitherOrBoth { } } -#[allow(clippy::from_over_into)] -impl Into>> for EitherOrBoth { - fn into(self) -> Option> { - match self { +impl From> for Option> { + fn from(value: EitherOrBoth) -> Self { + match value { Left(l) => Some(Either::Left(l)), Right(r) => Some(Either::Right(r)), Both(..) => None,