Skip to content

Commit e974219

Browse files
committed
Allow to use EitherOrBoth<T> to mean the same as EitherOrBoth<T, T>
1 parent 6ee999c commit e974219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/either_or_both.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use either::Either;
66

77
/// Value that either holds a single A or B, or both.
88
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
9-
pub enum EitherOrBoth<A, B> {
9+
pub enum EitherOrBoth<A, B = A> {
1010
/// Both values are present.
1111
Both(A, B),
1212
/// Only the left value of type `A` is present.

0 commit comments

Comments
 (0)