Skip to content

Commit

Permalink
Revert "fix clippy::from_over_into in either_or_both"
Browse files Browse the repository at this point in the history
This reverts commit 8e612cd.
  • Loading branch information
JoJoJet committed Jul 5, 2022
1 parent b1271d1 commit aa2c909
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/either_or_both.rs
Expand Up @@ -475,9 +475,9 @@ impl<T> EitherOrBoth<T, T> {
}
}

impl<A, B> From<EitherOrBoth<A, B>> for Option<Either<A, B>> {
fn from(val: EitherOrBoth<A, B>) -> Self {
match val {
impl<A, B> Into<Option<Either<A, B>>> for EitherOrBoth<A, B> {
fn into(self) -> Option<Either<A, B>> {
match self {
EitherOrBoth::Left(l) => Some(Either::Left(l)),
EitherOrBoth::Right(r) => Some(Either::Right(r)),
_ => None,
Expand Down

0 comments on commit aa2c909

Please sign in to comment.