Skip to content

Commit

Permalink
Auto merge of rust-lang#6669 - magurotuna:fix-test-name, r=flip1995
Browse files Browse the repository at this point in the history
Fix file names of flat_map_identity test

This patch fixes the file names of the `flat_map_identity` test.
Previously, their names were started with `unnecessary_flat_map` even though the lint rule name is `flat_map_identity`. This inconsistency happened probably because the rule name was changed during the discussion in the PR where this rule was introduced.

ref: rust-lang/rust-clippy#4231

changelog: none
  • Loading branch information
bors committed Feb 3, 2021
2 parents 3e41797 + 6396b8f commit 876ffa4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: called `flat_map(|x| x)` on an `Iterator`
--> $DIR/unnecessary_flat_map.rs:10:22
--> $DIR/flat_map_identity.rs:10:22
|
LL | let _ = iterator.flat_map(|x| x);
| ^^^^^^^^^^^^^^^ help: try: `flatten()`
|
= note: `-D clippy::flat-map-identity` implied by `-D warnings`

error: called `flat_map(std::convert::identity)` on an `Iterator`
--> $DIR/unnecessary_flat_map.rs:13:22
--> $DIR/flat_map_identity.rs:13:22
|
LL | let _ = iterator.flat_map(convert::identity);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`
Expand Down

0 comments on commit 876ffa4

Please sign in to comment.