chore: cargo clippy

This commit is contained in:
2025-05-20 18:39:09 +08:00
parent 736402dc53
commit 9b3c3d6fe9
10 changed files with 25 additions and 30 deletions

View File

@@ -56,7 +56,7 @@ impl<'vm, 'jit: 'vm> Func<'jit, 'vm> {
use Param::*;
let env = match self.func.param.clone() {
Ident(ident) => self.env.clone().enter_arg(ident.into(), arg),
Ident(ident) => self.env.clone().enter_arg(ident, arg),
Formals {
formals,
ellipsis,
@@ -75,7 +75,6 @@ impl<'vm, 'jit: 'vm> Func<'jit, 'vm> {
todo!()
}
for (formal, default) in formals {
let formal = formal.clone().into();
let arg = arg
.select(formal)
.or_else(|| {
@@ -85,12 +84,11 @@ impl<'vm, 'jit: 'vm> Func<'jit, 'vm> {
new.insert(formal, arg);
}
if let Some(alias) = alias {
new.insert(alias.clone().into(), Value::AttrSet(arg));
new.insert(alias, Value::AttrSet(arg));
}
self.env.clone().enter_attrs(AttrSet::new(new).into())
}
}
.into();
};
let count = self.count.get();
self.count.replace(count + 1);