aboutsummaryrefslogtreecommitdiff
path: root/examples/example-pack-err/src
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-26 06:27:16 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-26 06:41:01 +0800
commitd1a74ce57e5be72436376a829e9c7e1e7c1c561b (patch)
tree6ac923671fc09f1c47b613869d793ed3e04b91db /examples/example-pack-err/src
parente735671acb3a81e1b7e334e56b9ef3963ba0c2fc (diff)
refactor(general_renderer): rename to structural_renderer
Diffstat (limited to 'examples/example-pack-err/src')
-rw-r--r--examples/example-pack-err/src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/example-pack-err/src/main.rs b/examples/example-pack-err/src/main.rs
index f859fae..8716333 100644
--- a/examples/example-pack-err/src/main.rs
+++ b/examples/example-pack-err/src/main.rs
@@ -2,7 +2,7 @@
//!
//! > This example demonstrates how to use the `pack_err!` macro to define error types
//! > with automatic `name` field (set to snake_case at compile time) and optional `info` field.
-//! > Also demonstrates `--json` serialization when `general_renderer` is enabled.
+//! > Also demonstrates `--json` serialization when `structural_renderer` is enabled.
//!
//! Run:
//! ```bash
@@ -27,7 +27,7 @@
//! ```
use mingling::prelude::*;
-use mingling::setup::GeneralRendererSetup;
+use mingling::setup::StructuralRendererSetup;
use std::path::PathBuf;
dispatcher!("find", CMDFind => EntryFind);
@@ -45,7 +45,7 @@ dispatcher!("find-structural", CMDFindStructural => EntryFindStructural);
// The typed form additionally generates `pub fn new(info)`.
// name = "error_not_dir"
//
-// When `general_renderer` is enabled, the struct also gets
+// When `structural_renderer` is enabled, the struct also gets
// `#[derive(serde::Serialize)]` for --json / --yaml output.
// --------- IMPORTANT ---------
@@ -132,8 +132,8 @@ gen_program!();
fn main() {
let mut program = ThisProgram::new();
- // Add GeneralRendererSetup to support --json / --yaml flags
- program.with_setup(GeneralRendererSetup);
+ // Add StructuralRendererSetup to support --json / --yaml flags
+ program.with_setup(StructuralRendererSetup);
program.with_dispatcher(CMDFind);
program.with_dispatcher(CMDFindStructural);
let _ = program.exec();