diff --git a/src/main.rs b/src/main.rs index e4170fa..ed9c9da 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,7 +58,7 @@ use crate::base::*; pub fn main() { let src = " -\"{} {foobar}\" +\"thing\" "; let (tokens, lex_errs) = lexer().parse(src).into_output_errors(); if !lex_errs.is_empty() { diff --git a/src/parser.rs b/src/parser.rs index c009eb2..5c9a2da 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -397,7 +397,7 @@ fn parse_string(s: &str, span: SimpleSpan) -> Result>, S parts.push(( if is_word { StringPart::Word(current_part) - } else if current_part == s.to_string() { + } else if current_part == s { StringPart::Inline(current_part) } else { StringPart::Data(current_part)