fix: default clippy lints
This commit is contained in:
@@ -245,16 +245,16 @@ impl Engine {
|
||||
g.source = orig_source;
|
||||
});
|
||||
|
||||
self.eval_global_statements(global, caches, scope, ast.statements())
|
||||
.and_then(|r| {
|
||||
#[cfg(feature = "debugging")]
|
||||
if self.is_debugger_registered() {
|
||||
global.debugger_mut().status = crate::eval::DebuggerStatus::Terminate;
|
||||
let node = &crate::ast::Stmt::Noop(Position::NONE);
|
||||
self.run_debugger(global, caches, scope, None, node)?;
|
||||
}
|
||||
Ok(r)
|
||||
})
|
||||
let r = self.eval_global_statements(global, caches, scope, ast.statements())?;
|
||||
|
||||
#[cfg(feature = "debugging")]
|
||||
if self.is_debugger_registered() {
|
||||
global.debugger_mut().status = crate::eval::DebuggerStatus::Terminate;
|
||||
let node = &crate::ast::Stmt::Noop(Position::NONE);
|
||||
self.run_debugger(global, caches, scope, None, node)?;
|
||||
}
|
||||
|
||||
Ok(r)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -97,7 +97,7 @@ impl Engine {
|
||||
///
|
||||
/// // Compile a script to an AST and store it for later evaluation.
|
||||
/// // Notice that a PathBuf is required which can easily be constructed from a string.
|
||||
/// let ast = engine.compile_file_with_scope(&mut scope, "script.rhai".into())?;
|
||||
/// let ast = engine.compile_file_with_scope(&scope, "script.rhai".into())?;
|
||||
///
|
||||
/// let result = engine.eval_ast::<i64>(&ast)?;
|
||||
/// # }
|
||||
|
@@ -126,16 +126,16 @@ impl Engine {
|
||||
global.embedded_module_resolver = ast.resolver().cloned();
|
||||
}
|
||||
|
||||
self.eval_global_statements(global, caches, scope, ast.statements())
|
||||
.and_then(|_| {
|
||||
#[cfg(feature = "debugging")]
|
||||
if self.is_debugger_registered() {
|
||||
global.debugger_mut().status = crate::eval::DebuggerStatus::Terminate;
|
||||
let node = &crate::ast::Stmt::Noop(crate::Position::NONE);
|
||||
self.run_debugger(global, caches, scope, None, node)?;
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
let _ = self.eval_global_statements(global, caches, scope, ast.statements())?;
|
||||
|
||||
#[cfg(feature = "debugging")]
|
||||
if self.is_debugger_registered() {
|
||||
global.debugger_mut().status = crate::eval::DebuggerStatus::Terminate;
|
||||
let node = &crate::ast::Stmt::Noop(crate::Position::NONE);
|
||||
self.run_debugger(global, caches, scope, None, node)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user