feat: lots of optimization
* allocate vm stack on the stack * use Rc instead of Arc * optimize recursive attribute set
This commit is contained in:
@@ -695,7 +695,9 @@ fn downgrade_attr(attr: ast::Attr, ctx: &mut DowngradeContext) -> Result<Attr> {
|
||||
Ident(ident) => Ok(Attr::Str(ident.to_string().into())),
|
||||
Str(string) => {
|
||||
let parts = string.normalized_parts();
|
||||
if parts.len() == 1 {
|
||||
if parts.len() == 0 {
|
||||
Ok(Attr::Str("".into()))
|
||||
} else if parts.len() == 1 {
|
||||
match parts.into_iter().next().unwrap() {
|
||||
Literal(ident) => Ok(Attr::Str(ident.into())),
|
||||
Interpolation(interpol) => {
|
||||
|
||||
Reference in New Issue
Block a user