Commit 64f6fb5
Merge #727
727: Fuse the iterator in `LazyBuffer` r=phimuemue a=Philippe-Cholet
Fuse the iterator in `LazyBuffer`.
`@phimuemue` Do I push the new `LazyBuffer::size_hint` here?
EDIT: It could also have a "fill" method `pub fn fill(&mut self) { self.buffer.extend(self.it.by_ref()) }` that would later be better than `while self.get_next() {}`. I did not created it before but would have a use for it basically to then know the real length in "count" methods.
Co-authored-by: Philippe-Cholet <[email protected]>2 files changed
+6
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 27 | | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
35 | | - | |
36 | 31 | | |
37 | 32 | | |
38 | 33 | | |
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
42 | | - | |
43 | | - | |
| 37 | + | |
44 | 38 | | |
45 | | - | |
46 | 39 | | |
47 | | - | |
48 | 40 | | |
49 | 41 | | |
50 | 42 | | |
| |||
0 commit comments