aboutsummaryrefslogtreecommitdiff
path: root/examples/example-implicit-dispatcher/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example-implicit-dispatcher/src/main.rs')
-rw-r--r--examples/example-implicit-dispatcher/src/main.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/examples/example-implicit-dispatcher/src/main.rs b/examples/example-implicit-dispatcher/src/main.rs
index 340d585..69adcfe 100644
--- a/examples/example-implicit-dispatcher/src/main.rs
+++ b/examples/example-implicit-dispatcher/src/main.rs
@@ -9,15 +9,7 @@ dispatcher!("remote.add" /*, CMDRemoteAdd => EntryRemoteAdd */);
dispatcher!("remote.remove", CMDRemoteRemove => EntryRemoteRemove);
fn main() {
- let mut program = ThisProgram::new();
-
- // --------- IMPORTANT ---------
- program.with_dispatcher(CMDRemoteAdd);
- // ^^^^^^^^^^^^\_ CMDRemoteAdd is implicitly created
- // --------- IMPORTANT ---------
-
- program.with_dispatcher(CMDRemoteRemove);
- program.exec_and_exit();
+ ThisProgram::new().exec_and_exit();
}
gen_program!();