diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-17 05:56:01 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-17 05:56:01 +0800 |
| commit | 64c0dae51b40ffb8d3e63f3e9a298a93db2d09c2 (patch) | |
| tree | ce354a6150714ad610b518f9a30913fdc7cd6a53 | |
| parent | db84beb600532f2366babd9a6563214bee1f3732 (diff) | |
fix: update README StateNext example syntax
| -rw-r--r-- | README.md | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |
