diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-12 02:34:39 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-12 02:34:39 +0800 |
| commit | 4e163438f9d9af83c1492826acf742337ec147c9 (patch) | |
| tree | 94055401a7c958e0fe5e6f8e4143cccdf86e7e06 /mingling_core/src/program/repl_exec.rs | |
| parent | d5a039e9d882f8f50b3cc9cdc10bc7bd84a5fa4d (diff) | |
fix: suppress future_not_send lint and tighten Send bounds
Add `#[allow(clippy::future_not_send)]` to chain invocation methods and
clarify Send requirements for `exec` bounds.
Diffstat (limited to 'mingling_core/src/program/repl_exec.rs')
| -rw-r--r-- | mingling_core/src/program/repl_exec.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mingling_core/src/program/repl_exec.rs b/mingling_core/src/program/repl_exec.rs index ea36c75..fe29d16 100644 --- a/mingling_core/src/program/repl_exec.rs +++ b/mingling_core/src/program/repl_exec.rs @@ -35,6 +35,7 @@ where self.exec_wrapper(async |p| -> () { repl_loop(p).await; }) + .await else self.exec_wrapper(|p| -> () { repl_loop(p); } ) @@ -65,8 +66,13 @@ where result: &r, }); } + #[allow(unused_variables)] Err(ProgramInternalExecuteError::REPLPanic(panic)) => { - p.run_hook_repl_on_panic(&crate::hook::HookREPLOnPanicInfo { panic: &panic }); + might_be_async::select![ + {} else { + p.run_hook_repl_on_panic(&crate::hook::HookREPLOnPanicInfo { panic: &panic }); + } + ]; } _ => {} } @@ -128,5 +134,5 @@ async fn exec_once<C>( where C: ProgramCollect<Enum = C> + Send + Sync + 'static, { - super::exec::exec_with_args(p, &args).await + super::exec::exec_with_args(p, args).await } |
