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

@@ -51,7 +51,7 @@ impl<'jit, 'vm> LetEnv<'jit, 'vm> {
}
}
}
self.last.as_ref().map(|env| env.lookup(symbol)).flatten()
self.last.as_ref().and_then(|env| env.lookup(symbol))
}
pub fn enter_arg(self: Rc<Self>, ident: usize, val: Value<'jit, 'vm>) -> Rc<Self> {
@@ -82,7 +82,7 @@ impl<'jit, 'vm> LetEnv<'jit, 'vm> {
})
.collect::<HashMap<_, _>>();
let map = Env::Let(AttrSet::new(map).into());
let last = Some(self.into());
let last = Some(self);
LetEnv { last, map }.into()
}
@@ -96,7 +96,7 @@ impl<'jit, 'vm> WithEnv<'jit, 'vm> {
if let Some(val) = self.map.select(symbol) {
return Some(val);
}
self.last.as_ref().map(|env| env.lookup(symbol)).flatten()
self.last.as_ref().and_then(|env| env.lookup(symbol))
}
pub fn enter_with(self, new: Rc<AttrSet<'jit, 'vm>>) -> Self {