From 776e6444e60db89056dc3c90ba93d355ea32d660 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Mon, 24 Feb 2020 09:37:32 -0500 Subject: [PATCH] rustfmt --- src/value/parse.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/value/parse.rs b/src/value/parse.rs index 0c0d894..aa0b181 100644 --- a/src/value/parse.rs +++ b/src/value/parse.rs @@ -286,14 +286,22 @@ impl Value { } } } - q @ TokenKind::Symbol(Symbol::DoubleQuote) | - q @ TokenKind::Symbol(Symbol::SingleQuote) => { + q @ TokenKind::Symbol(Symbol::DoubleQuote) + | q @ TokenKind::Symbol(Symbol::SingleQuote) => { let mut s = String::new(); let mut is_escaped = false; while let Some(tok) = toks.next() { match tok.kind { - TokenKind::Symbol(Symbol::DoubleQuote) if !is_escaped && q == TokenKind::Symbol(Symbol::DoubleQuote) => break, - TokenKind::Symbol(Symbol::SingleQuote) if !is_escaped && q == TokenKind::Symbol(Symbol::SingleQuote) => break, + TokenKind::Symbol(Symbol::DoubleQuote) + if !is_escaped && q == TokenKind::Symbol(Symbol::DoubleQuote) => + { + break + } + TokenKind::Symbol(Symbol::SingleQuote) + if !is_escaped && q == TokenKind::Symbol(Symbol::SingleQuote) => + { + break + } TokenKind::Symbol(Symbol::BackSlash) if !is_escaped => is_escaped = true, TokenKind::Symbol(Symbol::BackSlash) => s.push('\\'), TokenKind::Interpolation => { @@ -315,7 +323,7 @@ impl Value { let quotes = match q { TokenKind::Symbol(Symbol::DoubleQuote) => QuoteKind::Double, TokenKind::Symbol(Symbol::SingleQuote) => QuoteKind::Single, - _ => unreachable!() + _ => unreachable!(), }; Ok(Value::Ident(s, quotes)) }