From c2edd02745b5bdfcb8a6bb1da64e411e77855cac Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 21 May 2026 15:57:38 +0800 Subject: Change `repl_post_readline` hook to accept mutable line reference --- mingling_core/src/program/repl_exec.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mingling_core/src/program/repl_exec.rs') 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()); -- cgit