Skip to content

Commit 5411836

Browse files
committed
fix: simplify boolean test to a single negation
1 parent d7fdf14 commit 5411836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/parser/src/grammar/items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use super::*;
1919
// struct S;
2020
pub(super) fn mod_contents(p: &mut Parser<'_>, stop_on_r_curly: bool) {
2121
attributes::inner_attrs(p);
22-
while !p.at(EOF) && !(p.at(T!['}']) && stop_on_r_curly) {
22+
while !(p.at(EOF) || (p.at(T!['}']) && stop_on_r_curly)) {
2323
item_or_macro(p, stop_on_r_curly);
2424
}
2525
}

0 commit comments

Comments
 (0)