diff options
Diffstat (limited to 'examples/example-lazy-resources/src/main.rs')
| -rw-r--r-- | examples/example-lazy-resources/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/example-lazy-resources/src/main.rs b/examples/example-lazy-resources/src/main.rs index 7dda658..2243f14 100644 --- a/examples/example-lazy-resources/src/main.rs +++ b/examples/example-lazy-resources/src/main.rs @@ -49,10 +49,11 @@ fn init_res_large_data() -> ResLargeData { ResLargeData { data } } -dispatcher!("show", CMDShow => EntryShow); -dispatcher!("none", CMDNone => EntryNone); +dispatcher!("show", EntryShow); +dispatcher!("none", EntryNone); -pack!(ResultShow = BTreeMap<Key, Value>); +#[derive(Grouped, Wrap)] +pub struct ResultShow(BTreeMap<Key, Value>); fn main() { let mut program = ThisProgram::new(); @@ -64,7 +65,6 @@ fn main() { program.with_resource(ResLargeData::lazy_init(init_res_large_data)); // --------- IMPORTANT --------- - program.with_dispatcher(CMDShow).with_dispatcher(CMDNone); program.exec_and_exit(); } |
