From ef2548142082c1a7d76bbdd3660b4330db1e18c4 Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Tue, 7 Jul 2020 17:25:24 -0400 Subject: [PATCH] invert if statement --- src/parse/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parse/mod.rs b/src/parse/mod.rs index b996139..1db523a 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -597,14 +597,14 @@ impl<'a> Parser<'a> { } '{' => { self.toks.next(); - if !found_true { + if found_true { + self.throw_away_until_closing_curly_brace(); + } else { found_true = true; body = read_until_closing_curly_brace(self.toks)?; self.toks.next(); - break; - } else { - self.throw_away_until_closing_curly_brace(); } + break; } _ => { return Err(("expected \"{\".", tok.pos()).into());