Skip to content

Commit

Permalink
Allow to use EitherOrBoth<T> to mean the same as EitherOrBoth<T, T>
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Jul 28, 2023
1 parent 6ee999c commit e974219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/either_or_both.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use either::Either;

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

0 comments on commit e974219

Please sign in to comment.