diff --git a/src/either_or_both.rs b/src/either_or_both.rs index cf65fe788..baf540c34 100644 --- a/src/either_or_both.rs +++ b/src/either_or_both.rs @@ -493,3 +493,12 @@ impl Into>> for EitherOrBoth { } } } + +impl From> for EitherOrBoth { + fn from(either: Either) -> Self { + match either { + Either::Left(l) => EitherOrBoth::Left(l), + Either::Right(l) => EitherOrBoth::Right(l), + } + } +}