Canonicalize all_equal_value's error#1032
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1032 +/- ##
==========================================
- Coverage 94.38% 93.92% -0.46%
==========================================
Files 48 52 +4
Lines 6665 6638 -27
==========================================
- Hits 6291 6235 -56
- Misses 374 403 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Checks fail because |
84b2e56 to
d7ab4e7
Compare
|
Rebased against our main branch. |
|
@phimuemue Can you rebase + add an entry to the changelog? Since we're cutting a breaking release anyways, I'd like to include this. |
I tried via the web UI, so I'm not sure if it worked. If not, I'll try to get back to this this evening. |
|
Thanks! Feel free to hit the merge button once the CHANGELOG has an entry for this. :-) Are you at RustWeek by any chance? |
* Similar to ExactlyOneError. * Use [Item; 2] instead of (Item, Item), because they have the same type and arrays are friendler wrt iteration.
5d276f7 to
54edb63
Compare
12b6ec6
Similar to
exactly_one_error's error type,all_equal_value's error type now implementsstd::error::Error. (I saw the discrepancy becauseexactly_one_errorworks withanyhow, whereasall_equal_valuedoes 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.