Commit b1dc19c
committed
Proxy nth in by ref iterators.
When treating a reference to an iterator as an iterator, proxy calls to
nth to the underlying implementation instead of calling the default nth
defined in the trait. This allows us to take advantage of optimized nth
implementations in by-ref iterators.
We can't proxy the other methods due to their sized constraints and the
fact that we can't specialize.1 parent 04483c8 commit b1dc19c
2 files changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | | - | |
1129 | | - | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1130 | 1140 | | |
1131 | 1141 | | |
1132 | 1142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
654 | 668 | | |
655 | 669 | | |
656 | 670 | | |
| |||
0 commit comments