Skip to content

Commit

Permalink
update clone
Browse files Browse the repository at this point in the history
update dependecies
  • Loading branch information
tronta committed Oct 14, 2024
1 parent 5b8cbc3 commit bdbea18
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ members = [

[dev-dependencies]
rand = "0.8.5"
relm4 = "0.8.0"
relm4-components = "0.8.0"
tokio = { version = "1.36", features = ["rt", "macros", "time", "rt-multi-thread", "sync"] }
tracker = "0.2.1"
relm4 = "0.9.1"
relm4-components = "0.9.1"
tokio = { version = "1.40.0", features = ["rt", "macros", "time", "rt-multi-thread", "sync"] }
tracker = "0.2.2"
clap = { version = "4.5.7", features = ["derive"] }
20 changes: 14 additions & 6 deletions examples/simple_manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,21 @@ impl SimpleComponent for AppModel {
vbox.append(&dec_button);
vbox.append(&label);

inc_button.connect_clicked(clone!(@strong sender => move |_| {
sender.input(AppInput::Increment);
}));
inc_button.connect_clicked(clone!(
#[strong]
sender,
move |_| {
sender.input(Msg::Increment);
}
));

dec_button.connect_clicked(clone!(@strong sender => move |_| {
sender.input(AppInput::Decrement);
}));
dec_button.connect_clicked(clone!(
#[strong]
sender,
move |_| {
sender.input(Msg::Decrement);
}
));

let widgets = AppWidgets { label };

Expand Down

0 comments on commit bdbea18

Please sign in to comment.