Skip to content

Commit 01a6b82

Browse files
committed
Some clippy warnings
1 parent 84c76f9 commit 01a6b82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ impl<'a> Tokenizer<'a> {
9696

9797
Position {
9898
line: bytes.lines().count(),
99-
column: bytes.lines().last().map(|line| {
99+
column: bytes.lines().last().map_or(1, |line| {
100100
line.chars().count() + 1
101-
}).unwrap_or(1)
101+
})
102102
}
103103
}
104104

@@ -125,7 +125,7 @@ impl<'a> Tokenizer<'a> {
125125
self.left_over = self.next_byte();
126126
}
127127

128-
return self.left_over;
128+
self.left_over
129129
}
130130

131131
#[inline(always)]

0 commit comments

Comments
 (0)