diff --git a/crates/oxc_parser/src/lexer/mod.rs b/crates/oxc_parser/src/lexer/mod.rs index ca4365b62bdf5..fedfb132094ce 100644 --- a/crates/oxc_parser/src/lexer/mod.rs +++ b/crates/oxc_parser/src/lexer/mod.rs @@ -265,6 +265,7 @@ impl<'a> Lexer<'a> { /// Peek the next byte, and advance the current position if it matches /// the given ASCII char. + // `#[inline(always)]` to make sure the `assert!` gets optimized out. #[allow(clippy::inline_always)] #[inline(always)] fn next_ascii_char_eq(&mut self, b: u8) -> bool { diff --git a/crates/oxc_parser/src/lexer/source.rs b/crates/oxc_parser/src/lexer/source.rs index bbeee075dfaa0..5dcb00cd6913a 100644 --- a/crates/oxc_parser/src/lexer/source.rs +++ b/crates/oxc_parser/src/lexer/source.rs @@ -202,8 +202,7 @@ impl<'a> Source<'a> { /// # SAFETY /// /// Caller must ensure that `ascii_byte` is a valid ASCII character. - #[allow(clippy::inline_always)] - #[inline(always)] + #[inline] pub(super) unsafe fn advance_if_ascii_eq(&mut self, ascii_byte: u8) -> bool { debug_assert!(ascii_byte.is_ascii()); let matched = self.peek_byte() == Some(ascii_byte);