fix: simplify boolean test to a single negation

This commit is contained in:
Alexis (Poliorcetics) Bourget 2023-05-07 09:44:07 +02:00
parent d7fdf141a4
commit 5411836767

View File

@ -19,7 +19,7 @@ use super::*;
// struct S;
pub(super) fn mod_contents(p: &mut Parser<'_>, stop_on_r_curly: bool) {
attributes::inner_attrs(p);
while !p.at(EOF) && !(p.at(T!['}']) && stop_on_r_curly) {
while !(p.at(EOF) || (p.at(T!['}']) && stop_on_r_curly)) {
item_or_macro(p, stop_on_r_curly);
}
}