itertools icon indicating copy to clipboard operation
itertools copied to clipboard

Canonicalize `all_equal_value`'s error

Open phimuemue opened this issue 4 months ago • 2 comments

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.

phimuemue avatar Jun 05 '25 13:06 phimuemue