aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-17 05:56:01 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-17 05:56:01 +0800
commit64c0dae51b40ffb8d3e63f3e9a298a93db2d09c2 (patch)
treece354a6150714ad610b518f9a30913fdc7cd6a53
parentdb84beb600532f2366babd9a6563214bee1f3732 (diff)
fix: update README StateNext example syntax
-rw-r--r--README.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/README.md b/README.md
index 20947f2..379c4dd 100644
--- a/README.md
+++ b/README.md
@@ -39,13 +39,14 @@ Mingling abstracts the behavior of a program's lifecycle into three phases: **Di
```rust
dispatcher!("current", EntryCurrent);
-#[derive(Grouped, Wrap, Default)]
-pub struct StateNext(());
+
+#[derive(Grouped)]
+pub struct StateNext;
#[chain]
fn handle_current(_: EntryCurrent) -> StateNext {
// 1. The first phase outputs the StateNext value
- StateNext::default() // ^^^^^^^^^
+ StateNext // ^^^^^^^^^
} // |
// |
// 2. The second phase takes StateNext as input