chore: cargo fmt
This commit is contained in:
@@ -24,7 +24,11 @@ pub struct Engine {
|
||||
}
|
||||
|
||||
pub fn eval(downgraded: Downgraded) -> Result<Value> {
|
||||
let mut engine = Engine::new(downgraded.thunks, downgraded.func_offset, downgraded.func_deps);
|
||||
let mut engine = Engine::new(
|
||||
downgraded.thunks,
|
||||
downgraded.func_offset,
|
||||
downgraded.func_deps,
|
||||
);
|
||||
engine.eval(downgraded.graph)
|
||||
}
|
||||
|
||||
@@ -34,7 +38,7 @@ impl Engine {
|
||||
tasks: PriorityQueue::new(),
|
||||
thunks,
|
||||
func_offset,
|
||||
func_deps
|
||||
func_deps,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +53,11 @@ impl Engine {
|
||||
env.insert_cache(member, val);
|
||||
}
|
||||
}
|
||||
env.lookup_cache(last, |_| unreachable!())
|
||||
.map(|mut val| Ok(val.force(self, &mut env)?.to_public(self, &mut HashSet::new())))?
|
||||
env.lookup_cache(last, |_| unreachable!()).map(|mut val| {
|
||||
Ok(val
|
||||
.force(self, &mut env)?
|
||||
.to_public(self, &mut HashSet::new()))
|
||||
})?
|
||||
}
|
||||
|
||||
pub fn eval_thunk(&mut self, idx: usize, env: &mut VmEnv) -> Result<i::Value> {
|
||||
@@ -65,8 +72,8 @@ impl Engine {
|
||||
let val = self.thunks[idx].clone().eval(self, env)?;
|
||||
env.insert_cache(idx, val)
|
||||
}
|
||||
},
|
||||
Dep::Thunk(idx) =>{
|
||||
}
|
||||
Dep::Thunk(idx) => {
|
||||
let val = self.thunks[idx].clone().eval(self, env)?;
|
||||
env.insert_cache(idx, val)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user