From c5736152b0adeef17349265c4b9277ba17b8bcfd Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 11 Jul 2026 14:44:17 +0800 Subject: feat: require renderers to return RenderResult instead of mutating one BREAKING CHANGE: The `render` method on `Renderer`, `HelpRequest`, and `ProgramCollect` now returns `RenderResult` instead of taking `&mut RenderResult`. The `r_print!` and `r_println!` macros have been removed in favor of using `std::io::Write` directly on `RenderResult`. --- mingling_core/src/program/collection/mock.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mingling_core/src/program/collection') diff --git a/mingling_core/src/program/collection/mock.rs b/mingling_core/src/program/collection/mock.rs index 568000a..20e6658 100644 --- a/mingling_core/src/program/collection/mock.rs +++ b/mingling_core/src/program/collection/mock.rs @@ -7,7 +7,7 @@ use crate::Dispatcher; use crate::{AnyOutput, ChainProcess, Groupped, ProgramCollect, RenderResult}; #[cfg(feature = "structural_renderer")] -use crate::{StructuralRendererSetting, error::StructuralRendererSerializeError}; +use crate::{error::StructuralRendererSerializeError, StructuralRendererSetting}; #[cfg(feature = "comp")] use crate::{ShellContext, Suggest}; @@ -59,11 +59,11 @@ impl ProgramCollect for MockProgramCollect { unreachable!() } - fn render(_any: AnyOutput, _r: &mut RenderResult) { + fn render(_any: AnyOutput) -> RenderResult { unreachable!() } - fn render_help(_any: AnyOutput, _r: &mut RenderResult) { + fn render_help(_any: AnyOutput) -> RenderResult { unreachable!() } -- cgit