look out for a simple to optimize format case
This commit is contained in:
1 parent
aefa8a2431
commit
c9bd5a4e6e
5 files changed
+46
-5
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user