diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/panes/src/main.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/panes/src/main.rs b/examples/panes/src/main.rs index 50b21fc5..b34ce205 100644 --- a/examples/panes/src/main.rs +++ b/examples/panes/src/main.rs @@ -77,8 +77,6 @@ impl Application for Launcher { } } - dbg!(self); - Command::none() } @@ -88,11 +86,14 @@ impl Application for Launcher { match example { Example::Clock(clock) => clock .subscription() - .map(move |message| Message::Clock(pane, message)), + .with(pane) + .map(|(pane, message)| Message::Clock(pane, message)), - Example::Stopwatch(stopwatch) => stopwatch - .subscription() - .map(move |message| Message::Stopwatch(pane, message)), + Example::Stopwatch(stopwatch) => { + stopwatch.subscription().with(pane).map( + |(pane, message)| Message::Stopwatch(pane, message), + ) + } } })); |