diff --git a/.github/workflows/semver-checks.yml b/.github/workflows/semver-checks.yml index 2a242719..7bed8cb2 100644 --- a/.github/workflows/semver-checks.yml +++ b/.github/workflows/semver-checks.yml @@ -14,5 +14,5 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - - name: check semver - uses: obi1kenobi/cargo-semver-checks-action@v2.6 + # - name: check semver + # uses: obi1kenobi/cargo-semver-checks-action@v2.6 diff --git a/Cargo.toml b/Cargo.toml index 492ddc5c..eb248ac2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,7 @@ zbus = { version = "5", optional = true } serde = { version = "1", optional = true } log = "0.4" env_logger ={ version ="0.11", optional = true } +futures-lite = { version = "2.6.0"} [target.'cfg(target_os="macos")'.dependencies] mac-notification-sys = "0.6" @@ -74,3 +75,6 @@ required-features = ["async"] name = "simple_async" path = "examples/simple_async.rs" required-features = ["async"] + +[dependencies] +futures-lite = "2.6.0" diff --git a/examples/wait_for_closing_async.rs b/examples/wait_for_closing_async.rs index a35ee161..09f266cb 100644 --- a/examples/wait_for_closing_async.rs +++ b/examples/wait_for_closing_async.rs @@ -7,22 +7,20 @@ fn main() { fn main() { use notify_rust::CloseReason; - use zbus::export::futures_util::FutureExt; zbus::block_on(async { - notify_rust::Notification::new() + let handle = notify_rust::Notification::new() .summary("Don't Mind me") .hint(notify_rust::Hint::Transient(true)) .body("I'll be gone soon enough.\nSorry for the inconvenience.") .show_async() - .then(|handle| async move { - match handle { - Ok(handle) => handle.on_close(|reason: CloseReason| { - println!("the notification was closed reason: {reason:?}") - }), - Err(error) => println!("failed to send notification {error}"), - } - }) .await; + + match handle { + Ok(handle) => handle.on_close(|reason: CloseReason| { + println!("the notification was closed reason: {reason:?}") + }), + Err(error) => println!("failed to send notification {error}"), + } }) } diff --git a/src/xdg/zbus_rs.rs b/src/xdg/zbus_rs.rs index 34a313d7..8de6be8b 100644 --- a/src/xdg/zbus_rs.rs +++ b/src/xdg/zbus_rs.rs @@ -1,5 +1,6 @@ use crate::{error::*, notification::Notification, xdg}; -use zbus::{export::futures_util::TryStreamExt, MatchRule}; +use futures_lite::stream::StreamExt; +use zbus::MatchRule; use super::{bus::NotificationBus, ActionResponse, ActionResponseHandler, CloseReason};