aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/setups
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-21 03:46:06 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-21 03:46:06 +0800
commitc81485b6ae1ba80d658ad8e4482d384303b539ef (patch)
treea15814ec00eeb06c4cacd989de0e9460ea8a328c /mingling/src/setups
parent7a438e07514ffc6b58b843dd8e42fa4088b95e71 (diff)
feat(core)!: replace RenderResult with buffered output model
Remove `Deref<Target=str>` and `render_text:String` in favor of `render_buffer:Vec<(String, RenderResultMode)>` and an `immediate_output` flag. Add `RenderResultMode` enum, `r_eprint!`/`r_eprintln!` macros, and new buffer manipulation methods (`append_to_buffer`, `eprint`, etc.). Update `Display` to trim output and remove trailing newline. Migrate all callers and tests away from `Deref` usage.
Diffstat (limited to 'mingling/src/setups')
-rw-r--r--mingling/src/setups/repl_basic.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/mingling/src/setups/repl_basic.rs b/mingling/src/setups/repl_basic.rs
index cf04372..150048b 100644
--- a/mingling/src/setups/repl_basic.rs
+++ b/mingling/src/setups/repl_basic.rs
@@ -75,7 +75,7 @@ where
fn setup(self, program: &mut Program<C>) {
program.with_hook(ProgramHook::empty().on_repl_receive_result(|r| {
if !r.result.is_empty() {
- println!("{}", r.result.trim())
+ println!("{}", r.result)
}
}));
}