rust-itertools / itertools

Extra iterator adaptors, iterator methods, free functions, and macros.
https://docs.rs/itertools/
Apache License 2.0
2.72k stars 309 forks source link

Allow to use EitherOrBoth<T> to mean the same as EitherOrBoth<T, T> #719

Closed glandium closed 1 year ago

phimuemue commented 1 year ago

Hi there, thanks for the idea.

Honest question: Does this - apart from avoiding a repeated type - enable something that could not be done with EitherOrBoth as it stands now? (E.g. allow usage in some generic contexts?) Did you experience problems with it?

glandium commented 1 year ago

No, I was just trying to avoid the repeated type, which can be bothersome when it's long.