From 90abd9c9a08c165384fae9c1f7c3fd098d512c48 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Mon, 10 Jan 2022 01:20:03 -0500 Subject: [PATCH] fix: detection of f-string formatting in components --- packages/core-macro/src/rsx/component.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-macro/src/rsx/component.rs b/packages/core-macro/src/rsx/component.rs index 13bcd30d3..5257022a4 100644 --- a/packages/core-macro/src/rsx/component.rs +++ b/packages/core-macro/src/rsx/component.rs @@ -181,7 +181,7 @@ impl Parse for ComponentField { return Ok(Self { name, content }); } - if name.to_string() == "key" { + if name == "key" { let content = ContentField::ManExpr(input.parse()?); return Ok(Self { name, content }); } @@ -221,7 +221,7 @@ fn is_literal_foramtted(lit: &LitStr) -> bool { while let Some(next) = chars.next() { if next == '{' { let nen = chars.next(); - if nen == Some('{') { + if nen != Some('{') { return true; } }