diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-21 15:57:38 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-21 15:57:38 +0800 |
| commit | c2edd02745b5bdfcb8a6bb1da64e411e77855cac (patch) | |
| tree | 934e9703fb3f4b3808bd387229ace101ccbec24b /mingling_core/src/program/repl_exec.rs | |
| parent | 53dc4370345962f2d2c069d5ba263a8efe7ba19f (diff) | |
Change `repl_post_readline` hook to accept mutable line reference
Diffstat (limited to 'mingling_core/src/program/repl_exec.rs')
| -rw-r--r-- | mingling_core/src/program/repl_exec.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mingling_core/src/program/repl_exec.rs b/mingling_core/src/program/repl_exec.rs index c4232ab..3d82b74 100644 --- a/mingling_core/src/program/repl_exec.rs +++ b/mingling_core/src/program/repl_exec.rs @@ -31,8 +31,8 @@ where self.exec_wrapper(|p| -> () { loop { p.run_hook_repl_pre_readline(); - let readline = p.run_hook_repl_readline().unwrap_or_default(); - p.run_hook_repl_post_readline(&readline); + let mut readline = p.run_hook_repl_readline().unwrap_or_default(); + p.run_hook_repl_post_readline(&mut readline); let args = split_input_string(readline.clone()); @@ -80,8 +80,8 @@ where self.exec_wrapper(async |p| -> () { loop { p.run_hook_repl_pre_readline(); - let readline = p.run_hook_repl_readline().unwrap_or_default(); - p.run_hook_repl_post_readline(&readline); + let mut readline = p.run_hook_repl_readline().unwrap_or_default(); + p.run_hook_repl_post_readline(&mut readline); let args = split_input_string(readline.clone()); |
