diff options
Diffstat (limited to 'GETTING_STARTED.md')
| -rw-r--r-- | GETTING_STARTED.md | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index bb2175f..621471e 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -551,7 +551,7 @@ fn main() { .on_pre_chain(|info| { println!("[DEBUG] Pre chain: {}", info.input); }) - .on_post_chain(|info| println!("[DEBUG] Post chain: {}", info.output.member_id)) + .on_post_chain(|info| println!("[DEBUG] Post chain: {}", info.output.member_id())) .on_finish(|_| { println!("[DEBUG] Loop end"); ProgramControlUnit::OverrideExitCode(0) // Override exit code @@ -577,6 +577,7 @@ With the `structural_renderer` feature, users can add `--json` or `--yaml` flags // serde = "1" use mingling::prelude::*; +use mingling::macros::buffer; use mingling::setup::picker::StructuralRendererSetup; use mingling::Grouped; use mingling::StructuralData; @@ -600,11 +601,9 @@ fn render_info(args: EntryRender) -> Next { ResultInfo { name, age }.to_chain() } -#[renderer] -fn render_info_result(info: ResultInfo) -> RenderResult { - let mut result = RenderResult::new(); - writeln!(result, "{} is {} years old", info.name, info.age).ok(); - result +#[renderer(buffer)] +fn render_info_result(info: ResultInfo) { + r_println!("{} is {} years old", info.name, info.age); } fn main() { |
