Skip to content

Commit

Permalink
fix cargo lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
branchseer committed Dec 28, 2024
1 parent 557c1be commit 93f4f1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/oxc_parser/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ impl Token {
cold_branch(|| {
self.len = u16::MAX;
long_ends.insert(self.start, end);
})
});
}
}

#[inline]
pub fn end(&self, long_ends: &FxHashMap<u32, u32>) -> u32 {
#[allow(clippy::if_not_else)]
if self.len != u16::MAX {
self.start + u32::from(self.len)
} else {
Expand All @@ -94,7 +95,7 @@ impl Token {
}
#[inline]
pub fn set_escaped(&mut self) {
self.flags.insert(TokenFlags::Escaped)
self.flags.insert(TokenFlags::Escaped);
}

#[inline]
Expand All @@ -104,7 +105,7 @@ impl Token {

#[inline]
pub fn set_is_on_new_line(&mut self) {
self.flags.insert(TokenFlags::IsOnNewLine)
self.flags.insert(TokenFlags::IsOnNewLine);
}

#[inline]
Expand Down

0 comments on commit 93f4f1a

Please sign in to comment.