diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2026-04-27 11:09:35 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2026-04-27 11:29:26 +0800 |
| commit | ae91bf2f6412edee65660085811248e0127fa97b (patch) | |
| tree | 504a055510a7592e64ec382cbef97cded7c7e69f /examples/example-async/src/main.rs | |
| parent | 704eb899babd85125d29cf41315e9df90515046f (diff) | |
Remove `marker::NextProcess` and generate it via `gen_program!`
Diffstat (limited to 'examples/example-async/src/main.rs')
| -rw-r--r-- | examples/example-async/src/main.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/example-async/src/main.rs b/examples/example-async/src/main.rs index 29aee7e..21e27aa 100644 --- a/examples/example-async/src/main.rs +++ b/examples/example-async/src/main.rs @@ -16,10 +16,7 @@ //! cargo run --manifest-path ./examples/example-async/Cargo.toml -- hello World //! ``` -use mingling::{ - macros::{chain, dispatcher, gen_program, pack, r_println, renderer}, - marker::NextProcess, -}; +use mingling::macros::{chain, dispatcher, gen_program, pack, r_println, renderer}; dispatcher!("hello", HelloCommand => HelloEntry); @@ -39,7 +36,7 @@ pack!(Hello = String); #[chain] // fn parse_name(prev: HelloEntry) -> NextProcess { -async fn parse_name(prev: HelloEntry) -> NextProcess { +async fn parse_name(prev: HelloEntry) -> mingling::ChainProcess<ThisProgram> { let name = prev.first().cloned().unwrap_or_else(|| "World".to_string()); Hello::new(name).to_render() } |
