Commit ae97d31
authored
This makes the last arm significantly shorter, but marginally shortens
the other ones as well
- I first removed the length comparisons from the match guards since
they were already present in `(unordered_)over`, but then brought them
back since they are quite a helpful "guard clause"
- It's a bit unfortunate that the `Slice`/`Array` arm can't use `over`
as well, which creates some asymmetry, but changing the signature of
`over` to accept arbitrary iterators felt like too much to me,
especially because we'd lose the ability to compare the lengths of the
two inputs (which could've been mitigated by `ExactLenIterator::len`,
but that method is still unstable AFAIR)
One other option would be to only use `unordered_over` in the last arm,
and not `over`, but I think `over` is not that bad..
changelog: none
3 files changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
760 | | - | |
| 760 | + | |
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
1992 | 1993 | | |
1993 | 1994 | | |
1994 | 1995 | | |
1995 | | - | |
| 1996 | + | |
1996 | 1997 | | |
1997 | 1998 | | |
1998 | 1999 | | |
| |||
2004 | 2005 | | |
2005 | 2006 | | |
2006 | 2007 | | |
2007 | | - | |
| 2008 | + | |
2008 | 2009 | | |
2009 | 2010 | | |
2010 | 2011 | | |
| |||
2017 | 2018 | | |
2018 | 2019 | | |
2019 | 2020 | | |
2020 | | - | |
2021 | | - | |
2022 | | - | |
2023 | | - | |
| 2021 | + | |
| 2022 | + | |
2024 | 2023 | | |
2025 | 2024 | | |
2026 | 2025 | | |
| |||
0 commit comments