1
Fork 0

use if let instead of single match arm expressions to compact code and reduce nesting (clippy::single_match)

This commit is contained in:
Matthias Krüger 2020-09-18 18:33:37 +02:00
parent 10b3595ba6
commit c690c82ad4
8 changed files with 28 additions and 58 deletions

View file

@ -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