Commit 20f13b2
committed
auto merge of #10930 : DaGenix/rust/remove-unnecessary-fields, r=alexcrichton
3 minor clean-ups now that #9629 is fixed:
* Update MutChunkIter to remove the ```remainder``` that existed just to allow the size_hint() method to be implemented. This is no longer necessary since we can just access the length of the slice directly.
* Update MutSplitIterator to address the FIXME in its size_hint() method. This method was only partially implemented due to the issue. Also, implement a minor optimization in the case that its the last iteration.
* Update ByRef iterator to implement the size_hint() method.
I noticed that MutSplitIterator returns an empty slice if called on an empty slice. I don't know if this is intended or not, but I left the ```finished``` field in-place to preserve this behavior.
@TeXitoi @blake2-ppc2 files changed
Lines changed: 20 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
798 | | - | |
| 798 | + | |
| 799 | + | |
799 | 800 | | |
800 | 801 | | |
801 | 802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2127 | 2127 | | |
2128 | 2128 | | |
2129 | 2129 | | |
2130 | | - | |
2131 | | - | |
| 2130 | + | |
2132 | 2131 | | |
2133 | 2132 | | |
2134 | 2133 | | |
| |||
2529 | 2528 | | |
2530 | 2529 | | |
2531 | 2530 | | |
2532 | | - | |
2533 | | - | |
2534 | | - | |
2535 | | - | |
2536 | | - | |
2537 | | - | |
2538 | | - | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
2539 | 2538 | | |
2540 | 2539 | | |
2541 | 2540 | | |
| |||
2548 | 2547 | | |
2549 | 2548 | | |
2550 | 2549 | | |
2551 | | - | |
2552 | | - | |
2553 | | - | |
2554 | | - | |
| 2550 | + | |
2555 | 2551 | | |
2556 | 2552 | | |
2557 | 2553 | | |
| |||
2568 | 2564 | | |
2569 | 2565 | | |
2570 | 2566 | | |
2571 | | - | |
2572 | | - | |
| 2567 | + | |
2573 | 2568 | | |
2574 | 2569 | | |
2575 | 2570 | | |
2576 | 2571 | | |
2577 | 2572 | | |
2578 | | - | |
| 2573 | + | |
2579 | 2574 | | |
2580 | 2575 | | |
2581 | | - | |
| 2576 | + | |
2582 | 2577 | | |
2583 | 2578 | | |
2584 | 2579 | | |
2585 | | - | |
2586 | 2580 | | |
2587 | 2581 | | |
2588 | 2582 | | |
2589 | 2583 | | |
2590 | 2584 | | |
2591 | 2585 | | |
2592 | | - | |
| 2586 | + | |
2593 | 2587 | | |
2594 | 2588 | | |
2595 | | - | |
| 2589 | + | |
2596 | 2590 | | |
2597 | 2591 | | |
2598 | 2592 | | |
| |||
2602 | 2596 | | |
2603 | 2597 | | |
2604 | 2598 | | |
2605 | | - | |
| 2599 | + | |
2606 | 2600 | | |
2607 | 2601 | | |
2608 | | - | |
| 2602 | + | |
2609 | 2603 | | |
2610 | 2604 | | |
2611 | | - | |
| 2605 | + | |
| 2606 | + | |
2612 | 2607 | | |
2613 | | - | |
2614 | 2608 | | |
2615 | 2609 | | |
2616 | 2610 | | |
| |||
0 commit comments