diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-04-20 15:26:17 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-04-20 15:26:17 +0800 |
| commit | 5a35628728cc89b4eba6360e3674a16d98d94dc3 (patch) | |
| tree | 51f19a3a8ca91df1902c4e8d1b8762a1bc329232 /docs | |
| parent | 1032b3be6e934b52b8b1b9bc7b3f031625605e18 (diff) | |
Update example to use synchronous program execution
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/pages/1-get-started.md | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/pages/1-get-started.md b/docs/pages/1-get-started.md index b05e72b..d3358f4 100644 --- a/docs/pages/1-get-started.md +++ b/docs/pages/1-get-started.md @@ -16,8 +16,7 @@ mingling = "0.1.6" ```rust use mingling::macros::{dispatcher, gen_program, r_println, renderer}; -#[tokio::main] -async fn main() { +fn main() { // Create ThisProgram let mut program = ThisProgram::new(); @@ -25,7 +24,7 @@ async fn main() { program.with_dispatcher(HelloCommand); // Run the program - program.exec().await; + program.exec(); } // Define the dispatcher `HelloCommand`, which routes the "hello" subcommand to `HelloEntry` |
