diff options
| author | Alexis (Poliorcetics) Bourget <ab_github@poliorcetiq.eu> | 2023-05-07 09:44:07 +0200 |
|---|---|---|
| committer | Alexis (Poliorcetics) Bourget <ab_github@poliorcetiq.eu> | 2023-05-07 09:44:07 +0200 |
| commit | 541183676781c8633ef6a2ed3d2847367acf6c5b (patch) | |
| tree | 8398a32f073614607c9b12d653ded5403d9c9a48 | |
| parent | d7fdf141a4574b57d7e56bc11d4e137de15f08d0 (diff) | |
| download | rust-541183676781c8633ef6a2ed3d2847367acf6c5b.tar.gz rust-541183676781c8633ef6a2ed3d2847367acf6c5b.zip | |
fix: simplify boolean test to a single negation
| -rw-r--r-- | crates/parser/src/grammar/items.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/parser/src/grammar/items.rs b/crates/parser/src/grammar/items.rs index 5e0951bf8b5..1c056819f4b 100644 --- a/crates/parser/src/grammar/items.rs +++ b/crates/parser/src/grammar/items.rs @@ -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); } } |
