Commit 19a455f
committed
Remove implementing Deref<Target = [T]> for HistoryBuf
There is already `as_slice()` which gives access to the underlying
backing array where the elements are not in the order of writing.
With automatic dereferencing, functions like `iter()` or `windows()` are
automatically available for `HistoryBuf` and are returning items in an
order which does not reflect the write order and will likely surprise
users which did not carefully read all the documentation on for
`HistoryBuf` like me.1 parent d29f95c commit 19a455f
2 files changed
+8
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
572 | 571 | | |
573 | 572 | | |
574 | 573 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | 574 | | |
584 | 575 | | |
585 | 576 | | |
586 | | - | |
| 577 | + | |
587 | 578 | | |
588 | 579 | | |
589 | 580 | | |
| |||
592 | 583 | | |
593 | 584 | | |
594 | 585 | | |
595 | | - | |
| 586 | + | |
596 | 587 | | |
597 | 588 | | |
598 | 589 | | |
| |||
660 | 651 | | |
661 | 652 | | |
662 | 653 | | |
663 | | - | |
664 | 654 | | |
665 | 655 | | |
666 | 656 | | |
| |||
910 | 900 | | |
911 | 901 | | |
912 | 902 | | |
913 | | - | |
914 | | - | |
| 903 | + | |
| 904 | + | |
915 | 905 | | |
916 | 906 | | |
917 | 907 | | |
| |||
0 commit comments