Skip to content

Commit c6d6431

Browse files
committed
wrong_self_convention: fix dogfood test
There was a `single-match-else` clippy warning.
1 parent c26a704 commit c6d6431

File tree

1 file changed

+11
-11
lines changed
  • clippy_lints/src/methods

1 file changed

+11
-11
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,17 +1968,17 @@ fn lint_wrong_self_convention<'tcx>(
19681968
None
19691969
}
19701970
};
1971-
match special_case {
1972-
Some(suggestion) => suggestion,
1973-
None => {
1974-
let s = conventions
1975-
.iter()
1976-
.map(|c| format!("`{}`", &c.to_string()))
1977-
.collect::<Vec<_>>()
1978-
.join(" and ");
1979-
1980-
format!("methods called like this: ({})", &s)
1981-
},
1971+
1972+
if let Some(suggestion) = special_case {
1973+
suggestion
1974+
} else {
1975+
let s = conventions
1976+
.iter()
1977+
.map(|c| format!("`{}`", &c.to_string()))
1978+
.collect::<Vec<_>>()
1979+
.join(" and ");
1980+
1981+
format!("methods called like this: ({})", &s)
19821982
}
19831983
} else {
19841984
format!("methods called `{}`", &conventions[0])

0 commit comments

Comments
 (0)