diff --git a/contrib/reproducible/guix/build.sh b/contrib/reproducible/guix/build.sh index c9d3a29a..14997232 100755 --- a/contrib/reproducible/guix/build.sh +++ b/contrib/reproducible/guix/build.sh @@ -17,6 +17,11 @@ replace-with = "vendored_sources" git = "https://github.com/wizardsardine/liana" branch = "master" replace-with = "vendored_sources" + +[source."https://github.com/edouardparis/iced"] +git = "https://github.com/edouardparis/iced" +branch = "fix-futures-recipe" +replace-with = "vendored_sources" EOF # We need to set RUSTC_BOOTSTRAP=1 as a workaround to be able to use unstable diff --git a/gui/Cargo.lock b/gui/Cargo.lock index 99b83b1a..90aa09e1 100644 --- a/gui/Cargo.lock +++ b/gui/Cargo.lock @@ -1750,8 +1750,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "215d51fa4f70dbb63775d7141243c4d98d4d525d8949695601f8fbac7dcbc04e" +source = "git+https://github.com/edouardparis/iced?branch=fix-futures-recipe#2d8318b13bdf8aaf31bc6d5a72b22313ed2d10cf" dependencies = [ "futures", "log", diff --git a/gui/Cargo.toml b/gui/Cargo.toml index e97577b0..394dae94 100644 --- a/gui/Cargo.toml +++ b/gui/Cargo.toml @@ -47,6 +47,9 @@ bitcoin_hashes = "0.12" reqwest = { version = "0.11", default-features=false, features = ["rustls-tls"] } rust-ini = "0.19.0" +[patch.crates-io] +iced_futures = { git = "https://github.com/edouardparis/iced", branch = "fix-futures-recipe"} + [target.'cfg(windows)'.dependencies] zip = { version = "0.6", default-features=false, features = ["bzip2", "deflate"] } diff --git a/gui/src/main.rs b/gui/src/main.rs index c70f669d..efde6ab6 100644 --- a/gui/src/main.rs +++ b/gui/src/main.rs @@ -259,18 +259,14 @@ impl Application for GUI { State::App(v) => v.subscription().map(|msg| Message::Run(Box::new(msg))), State::Launcher(v) => v.subscription().map(|msg| Message::Launch(Box::new(msg))), }, - iced_native::subscription::events_with(|event, _status| { - if matches!( - event, - iced::Event::Window(iced_native::window::Event::CloseRequested) - ) { - Some(event) - } else { - None - } - }) - .map(Self::Message::Event), + iced_native::subscription::events().map(Self::Message::Event), ]) + .with_filter(|(event, _status)| { + matches!( + event, + iced::Event::Window(iced_native::window::Event::CloseRequested) + ) + }) } fn view(&self) -> Element {