Change on_debugger to register_debugger.
This commit is contained in:
parent
389bb9bf66
commit
dca0185323
@ -264,7 +264,7 @@ impl Engine {
|
||||
/// Exported under the `debugging` feature only.
|
||||
#[cfg(feature = "debugging")]
|
||||
#[inline(always)]
|
||||
pub fn on_debugger(
|
||||
pub fn register_debugger(
|
||||
&mut self,
|
||||
init: impl Fn() -> Dynamic + SendSync + 'static,
|
||||
callback: impl Fn(
|
||||
|
@ -220,7 +220,7 @@ fn main() {
|
||||
// Hook up debugger
|
||||
let lines: Vec<_> = script.trim().split('\n').map(|s| s.to_string()).collect();
|
||||
|
||||
engine.on_debugger(
|
||||
engine.register_debugger(
|
||||
// Store the current source in the debugger state
|
||||
|| "".into(),
|
||||
// Main debugging interface
|
||||
|
@ -41,7 +41,7 @@ fn test_debugging() -> Result<(), Box<EvalAltResult>> {
|
||||
fn test_debugger_state() -> Result<(), Box<EvalAltResult>> {
|
||||
let mut engine = Engine::new();
|
||||
|
||||
engine.on_debugger(
|
||||
engine.register_debugger(
|
||||
|| {
|
||||
// Say, use an object map for the debugger state
|
||||
let mut state = Map::new();
|
||||
|
Loading…
Reference in New Issue
Block a user