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

@@ -53,17 +53,14 @@ impl<'jit: 'vm, 'vm> AttrSet<'jit, 'vm> {
}
pub fn capture(&mut self, env: &Rc<LetEnv<'jit, 'vm>>) {
self.data.iter().for_each(|(_, v)| match v.clone() {
Value::Thunk(ref thunk) => {
thunk.capture(env.clone());
}
_ => (),
self.data.iter().for_each(|(_, v)| if let Value::Thunk(ref thunk) = v.clone() {
thunk.capture(env.clone());
})
}
pub fn update(&mut self, other: &AttrSet<'jit, 'vm>) {
for (k, v) in other.data.iter() {
self.push_attr_force(k.clone(), v.clone())
self.push_attr_force(*k, v.clone())
}
}
@@ -79,7 +76,7 @@ impl<'jit: 'vm, 'vm> AttrSet<'jit, 'vm> {
let mut map: Vec<_> = self
.data
.iter()
.map(|(k, v)| (k.clone(), v.clone()))
.map(|(k, v)| (*k, v.clone()))
.collect();
for (_, v) in map.iter_mut() {
v.force_deep(vm)?;