diff options
Diffstat (limited to 'src/tools/clippy/src/docs/cloned_instead_of_copied.txt')
-rw-r--r-- | src/tools/clippy/src/docs/cloned_instead_of_copied.txt | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/tools/clippy/src/docs/cloned_instead_of_copied.txt b/src/tools/clippy/src/docs/cloned_instead_of_copied.txt deleted file mode 100644 index 2f2014d5f..000000000 --- a/src/tools/clippy/src/docs/cloned_instead_of_copied.txt +++ /dev/null @@ -1,16 +0,0 @@ -### What it does -Checks for usages of `cloned()` on an `Iterator` or `Option` where -`copied()` could be used instead. - -### Why is this bad? -`copied()` is better because it guarantees that the type being cloned -implements `Copy`. - -### Example -``` -[1, 2, 3].iter().cloned(); -``` -Use instead: -``` -[1, 2, 3].iter().copied(); -```
\ No newline at end of file |