Skip to content

Commit

Permalink
fix clippy::from_over_into in either_or_both
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJoJet committed Jul 4, 2022
1 parent f598ad4 commit 8e612cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/either_or_both.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ impl<T> EitherOrBoth<T, T> {
}
}

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

0 comments on commit 8e612cd

Please sign in to comment.