use if let instead of single match arm expressions to compact code and reduce nesting (clippy::single_match)
This commit is contained in:
parent
10b3595ba6
commit
c690c82ad4
8 changed files with 28 additions and 58 deletions
|
@ -527,12 +527,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