look out for a simple to optimize format case

This commit is contained in:
Evan Almloff committed 2024-01-07 17:02:49 -06:00
1 parent aefa8a2431
commit c9bd5a4e6e
5 files changed
+46 -5

No files matched your search

+1 -1
View File
@@ -155,7 +155,7 @@ impl ToTokens for ElementAttrValue {
impl ElementAttrValue {
fn to_str_expr(&self) -> Option<TokenStream2> {
match self {
ElementAttrValue::AttrLiteral(lit) => Some(quote!(#lit.to_string())),
ElementAttrValue::AttrLiteral(lit) => Some(quote!(#lit)),
ElementAttrValue::AttrOptionalExpr { value, .. } => value.to_str_expr(),
ElementAttrValue::AttrExpr(expr) => Some(quote!(#expr.to_string())),
_ => None,