refactor(parser): correct comment (#2441)

Just correcting a typo in a comment, and moving comment to a better
place.
This commit is contained in:
overlookmotel 2024-02-20 02:43:12 +00:00 committed by GitHub
parent 996a9d27eb
commit a5a3c695f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -234,10 +234,10 @@ impl SafeByteMatchTable {
macro_rules! safe_byte_match_table {
(|$byte:ident| $res:expr) => {{
use crate::lexer::search::SafeByteMatchTable;
// Clippy creates warnings because e.g. `safe_byte_match_table!(|b| b == 0)`
// is expanded to `SafeByteMatchTable([0 == 0, ... ])`
#[allow(clippy::eq_op)]
const TABLE: SafeByteMatchTable = seq_macro::seq!($byte in 0u8..=255 {
// Clippy creates warnings because e.g. `byte_match_table!(|b| b == 0)`
// is expanded to `SafeByteMatchTable([0 == 0, ... ])`
SafeByteMatchTable::new([#($res,)*])
});
TABLE