Rollup merge of #76888 - matthiaskrgr:clippy_single_match_2, r=Dylan-DPC
use if let instead of single match arm expressions use if let instead of single match arm expressions to compact code and reduce nesting (clippy::single_match)
This commit is contained in:
commit
dcf4d1f2be
8 changed files with 28 additions and 58 deletions
|
@ -525,12 +525,9 @@ impl<'a> Parser<'a> {
|
|||
|
||||
// fill character
|
||||
if let Some(&(_, c)) = self.cur.peek() {
|
||||
match self.cur.clone().nth(1) {
|
||||
Some((_, '>' | '<' | '^')) => {
|
||||
spec.fill = Some(c);
|
||||
self.cur.next();
|
||||
}
|
||||
_ => {}
|
||||
if let Some((_, '>' | '<' | '^')) = self.cur.clone().nth(1) {
|
||||
spec.fill = Some(c);
|
||||
self.cur.next();
|
||||
}
|
||||
}
|
||||
// Alignment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue