We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84c76f9 commit 01a6b82Copy full SHA for 01a6b82
src/parser.rs
@@ -96,9 +96,9 @@ impl<'a> Tokenizer<'a> {
96
97
Position {
98
line: bytes.lines().count(),
99
- column: bytes.lines().last().map(|line| {
+ column: bytes.lines().last().map_or(1, |line| {
100
line.chars().count() + 1
101
- }).unwrap_or(1)
+ })
102
}
103
104
@@ -125,7 +125,7 @@ impl<'a> Tokenizer<'a> {
125
self.left_over = self.next_byte();
126
127
128
- return self.left_over;
+ self.left_over
129
130
131
#[inline(always)]
0 commit comments