|
1 | | -error: iterator can implement ExactSizeIterator |
| 1 | +error: iterator can implement `ExactSizeIterator` |
2 | 2 | --> tests/ui/iter_missing_exact_size.rs:11:1 |
3 | 3 | | |
4 | 4 | LL | / impl Iterator for StringRepeater1 { |
5 | 5 | LL | | |
6 | 6 | LL | | type Item = String; |
7 | 7 | LL | | fn next(&mut self) -> Option<Self::Item> { |
8 | 8 | ... | |
9 | | -LL | | self.range.size_hint() |
10 | | - | | ---------------------- This size_hint() implementation delegates to the size_hint() of an ExactSizeIterator |
11 | | -LL | | } |
12 | 9 | LL | | } |
13 | 10 | | |_^ |
14 | 11 | | |
15 | | - = help: since size_hint() delegates to an ExactSizeIterator, the overall iterator is likely to have an exact size |
| 12 | +help: this `size_hint()` implementation delegates to to the `size_hint()` of an `ExactSizeIterator`, so the overall iterator is likely to have an exact size |
| 13 | + --> tests/ui/iter_missing_exact_size.rs:18:9 |
| 14 | + | |
| 15 | +LL | self.range.size_hint() |
| 16 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
16 | 17 | = note: `-D clippy::iter-missing-exact-size` implied by `-D warnings` |
17 | 18 | = help: to override `-D warnings` add `#[allow(clippy::iter_missing_exact_size)]` |
18 | 19 |
|
19 | | -error: iterator can implement ExactSizeIterator |
| 20 | +error: iterator can implement `ExactSizeIterator` |
20 | 21 | --> tests/ui/iter_missing_exact_size.rs:25:1 |
21 | 22 | | |
22 | 23 | LL | / impl Iterator for StringRepeater2 { |
23 | 24 | LL | | |
24 | 25 | LL | | type Item = String; |
25 | 26 | LL | | fn next(&mut self) -> Option<Self::Item> { |
26 | 27 | ... | |
27 | | -LL | | self.1.size_hint() |
28 | | - | | ------------------ This size_hint() implementation delegates to the size_hint() of an ExactSizeIterator |
29 | | -LL | | } |
30 | 28 | LL | | } |
31 | 29 | | |_^ |
32 | 30 | | |
33 | | - = help: since size_hint() delegates to an ExactSizeIterator, the overall iterator is likely to have an exact size |
| 31 | +help: this `size_hint()` implementation delegates to to the `size_hint()` of an `ExactSizeIterator`, so the overall iterator is likely to have an exact size |
| 32 | + --> tests/ui/iter_missing_exact_size.rs:32:9 |
| 33 | + | |
| 34 | +LL | self.1.size_hint() |
| 35 | + | ^^^^^^^^^^^^^^^^^^ |
34 | 36 |
|
35 | 37 | error: aborting due to 2 previous errors |
36 | 38 |
|
0 commit comments