diff options
Diffstat (limited to 'src/tools/clippy/src/docs/iter_not_returning_iterator.txt')
-rw-r--r-- | src/tools/clippy/src/docs/iter_not_returning_iterator.txt | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/tools/clippy/src/docs/iter_not_returning_iterator.txt b/src/tools/clippy/src/docs/iter_not_returning_iterator.txt deleted file mode 100644 index 0ca862910..000000000 --- a/src/tools/clippy/src/docs/iter_not_returning_iterator.txt +++ /dev/null @@ -1,26 +0,0 @@ -### What it does -Detects methods named `iter` or `iter_mut` that do not have a return type that implements `Iterator`. - -### Why is this bad? -Methods named `iter` or `iter_mut` conventionally return an `Iterator`. - -### Example -``` -// `String` does not implement `Iterator` -struct Data {} -impl Data { - fn iter(&self) -> String { - todo!() - } -} -``` -Use instead: -``` -use std::str::Chars; -struct Data {} -impl Data { - fn iter(&self) -> Chars<'static> { - todo!() - } -} -```
\ No newline at end of file |