Fine tune Engine size.
This commit is contained in:
@@ -205,9 +205,13 @@ impl Engine {
|
||||
}
|
||||
|
||||
// Report progress
|
||||
self.progress
|
||||
.as_ref()
|
||||
.and_then(|p| p(global.num_operations))
|
||||
.map_or(Ok(()), |token| Err(ERR::ErrorTerminated(token, pos).into()))
|
||||
if let Some(ref progress) = self.progress {
|
||||
match progress(global.num_operations) {
|
||||
None => Ok(()),
|
||||
Some(token) => Err(ERR::ErrorTerminated(token, pos).into()),
|
||||
}
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -510,7 +510,7 @@ impl Engine {
|
||||
let src = global.source_raw().cloned();
|
||||
let src = src.as_ref().map(|s| s.as_str());
|
||||
let context = EvalContext::new(self, global, caches, scope, this_ptr);
|
||||
let (.., ref on_debugger) = **x;
|
||||
let (.., ref on_debugger) = *x;
|
||||
|
||||
let command = on_debugger(context, event, node, src, node.position());
|
||||
|
||||
|
Reference in New Issue
Block a user