diff options
Diffstat (limited to 'src/tools/clippy/src/docs/single_element_loop.txt')
-rw-r--r-- | src/tools/clippy/src/docs/single_element_loop.txt | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/tools/clippy/src/docs/single_element_loop.txt b/src/tools/clippy/src/docs/single_element_loop.txt deleted file mode 100644 index 6f0c15a85..000000000 --- a/src/tools/clippy/src/docs/single_element_loop.txt +++ /dev/null @@ -1,21 +0,0 @@ -### What it does -Checks whether a for loop has a single element. - -### Why is this bad? -There is no reason to have a loop of a -single element. - -### Example -``` -let item1 = 2; -for item in &[item1] { - println!("{}", item); -} -``` - -Use instead: -``` -let item1 = 2; -let item = &item1; -println!("{}", item); -```
\ No newline at end of file |