diff options
Diffstat (limited to 'src/docs/explicit_iter_loop.txt')
| -rw-r--r-- | src/docs/explicit_iter_loop.txt | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/docs/explicit_iter_loop.txt b/src/docs/explicit_iter_loop.txt deleted file mode 100644 index cabe72e91d0..00000000000 --- a/src/docs/explicit_iter_loop.txt +++ /dev/null @@ -1,25 +0,0 @@ -### What it does -Checks for loops on `x.iter()` where `&x` will do, and -suggests the latter. - -### Why is this bad? -Readability. - -### Known problems -False negatives. We currently only warn on some known -types. - -### Example -``` -// with `y` a `Vec` or slice: -for x in y.iter() { - // .. -} -``` - -Use instead: -``` -for x in &y { - // .. -} -``` \ No newline at end of file |
