From bdbea185365473c048f62471f043caf978be276d Mon Sep 17 00:00:00 2001 From: Peter Sonntag Date: Mon, 14 Oct 2024 18:28:52 +0200 Subject: [PATCH 1/2] update clone update dependecies --- Cargo.toml | 8 ++++---- examples/simple_manual.rs | 20 ++++++++++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f3d27a5..a48fd77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/examples/simple_manual.rs b/examples/simple_manual.rs index 931b6bd..a9b6766 100644 --- a/examples/simple_manual.rs +++ b/examples/simple_manual.rs @@ -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 }; From 54117db6b53a953f4151ad11e3b995264334f53f Mon Sep 17 00:00:00 2001 From: Peter Sonntag Date: Tue, 15 Oct 2024 21:11:05 +0200 Subject: [PATCH 2/2] update crate versions --- src/introduction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/introduction.md b/src/introduction.md index 7e8e792..8c2f538 100644 --- a/src/introduction.md +++ b/src/introduction.md @@ -38,8 +38,8 @@ I also recommend reading the [gtk4-rs book](https://gtk-rs.org/gtk4-rs/git/book/ Add the packages you need to your `Cargo.toml`: ```toml -relm4 = "0.8.0" -relm4-components = "0.8.0" +relm4 = "0.9.1" +relm4-components = "0.9.1" ``` ## Issues and feedback