Skip to content

Commit

Permalink
wrong_self_convention: fix dogfood test
Browse files Browse the repository at this point in the history
There was a `single-match-else` clippy warning.
  • Loading branch information
mgacek8 committed Mar 11, 2021
1 parent c26a704 commit c6d6431
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1968,17 +1968,17 @@ fn lint_wrong_self_convention<'tcx>(
None
}
};
match special_case {
Some(suggestion) => suggestion,
None => {
let s = conventions
.iter()
.map(|c| format!("`{}`", &c.to_string()))
.collect::<Vec<_>>()
.join(" and ");

format!("methods called like this: ({})", &s)
},

if let Some(suggestion) = special_case {
suggestion
} else {
let s = conventions
.iter()
.map(|c| format!("`{}`", &c.to_string()))
.collect::<Vec<_>>()
.join(" and ");

format!("methods called like this: ({})", &s)
}
} else {
format!("methods called `{}`", &conventions[0])
Expand Down

0 comments on commit c6d6431

Please sign in to comment.