mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-16 10:25:02 +01:00
improve code (some clippy::pedantic lints)
This commit is contained in:
parent
a42cec3075
commit
5699ab190a
7 changed files with 33 additions and 36 deletions
|
|
@ -28,8 +28,7 @@ impl Env<'_> {
|
|||
env.locals.get(&name.sym).copied().or_else(|| {
|
||||
env.outer
|
||||
.as_ref()
|
||||
.map(|outer| lookup_inner(&outer.borrow(), name))
|
||||
.flatten()
|
||||
.and_then(|outer| lookup_inner(&outer.borrow(), name))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +67,7 @@ pub fn compile<'ast, 'bc, 'gc>(
|
|||
blocks: Vec::new_in(bytecode_bump),
|
||||
current_block: 0,
|
||||
bump: bytecode_bump,
|
||||
env: Rc::new(RefCell::new(Default::default())),
|
||||
env: Rc::new(RefCell::new(Env::default())),
|
||||
rt,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue