itertools
itertools copied to clipboard
Canonicalize `all_equal_value`'s error
Similar to exactly_one_error's error type, all_equal_value's error type now implements std::error::Error. (I saw the discrepancy because exactly_one_error works with anyhow, whereas all_equal_value does not.)
Since I had to introduce a new type anyways, I converted from (Item, Item) to [Item; 2]. I suggest we generally lean towards arrays instead of tuples if the components have the same type.