From c24169ef76b2b0be6d2acb4e6b4b445161a19d49 Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Tue, 10 Sep 2024 23:22:45 +0200 Subject: [PATCH 1/6] fix: more precise dependency on lazy_static addressing lib.rs dashboard warning --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a1019747..5deece56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ include = [ [target.'cfg(all(unix, not(target_os = "macos")))'.dependencies] dbus = { version = "0.9", optional = true } -lazy_static = { version = "1", optional = true } +lazy_static = { version = "1.5", optional = true } image = { version = "0.25", optional = true } zbus = { version = "4", optional = true } serde = { version = "1", optional = true } From 6edff02d5450b9ae13f8271f32685fe9bca64404 Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Tue, 10 Sep 2024 23:23:04 +0200 Subject: [PATCH 2/6] fix(docs): link warning --- src/notification.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notification.rs b/src/notification.rs index 78428f55..eece8334 100644 --- a/src/notification.rs +++ b/src/notification.rs @@ -452,7 +452,7 @@ impl Notification { windows::show_notification(self) } - /// Wraps [`show()`] but prints notification to stdout. + /// Wraps [`Notification::show()`] but prints notification to stdout. #[cfg(all(unix, not(target_os = "macos")))] #[deprecated = "this was never meant to be public API"] pub fn show_debug(&mut self) -> Result { From 85bfd34cd1f20db47271e0d7dc3558e74d6855c3 Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Tue, 10 Sep 2024 23:25:53 +0200 Subject: [PATCH 3/6] build: comment out references to server suppressing new cargo warnings --- Cargo.toml | 2 +- src/lib.rs | 7 ++----- src/urgency.rs | 26 +++++++++++++------------- src/xdg/mod.rs | 18 +++++++++--------- 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5deece56..85e085c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ winrt-notification = { package = "tauri-winrt-notification", version = "0.2" } [features] default = ["z"] -#`server = [] +# server = [] d = ["dbus"] d_vendored = ["dbus/vendored"] z = ["zbus", "serde", "async"] diff --git a/src/lib.rs b/src/lib.rs index 83d4de71..71feb169 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -179,9 +179,6 @@ mod xdg; #[cfg(all(feature = "images", unix, not(target_os = "macos")))] mod image; -#[cfg(all(feature = "server", feature = "dbus", unix, not(target_os = "macos")))] -pub mod server; - #[cfg(target_os = "macos")] pub use mac_notification_sys::{get_bundle_identifier_or_default, set_application}; @@ -198,8 +195,8 @@ pub use crate::xdg::{ CloseHandler, CloseReason, DbusStack, NotificationHandle, }; -#[cfg(all(feature = "server", unix, not(target_os = "macos")))] -pub use crate::xdg::stop_server; +// #[cfg(all(feature = "server", unix, not(target_os = "macos")))] +// pub use crate::xdg::stop_server; pub use crate::hints::Hint; diff --git a/src/urgency.rs b/src/urgency.rs index 25cdabb2..44dbed54 100644 --- a/src/urgency.rs +++ b/src/urgency.rs @@ -63,25 +63,25 @@ impl From> for Urgency { } // TODO: remove this in v5.0 -#[cfg(not(feature = "server"))] +// #[cfg(not(feature = "server"))] impl From for Urgency { fn from(int: u64) -> Urgency { match int { 0 => Urgency::Low, 1 => Urgency::Normal, - 2..=std::u64::MAX => Urgency::Critical, + 2..=u64::MAX => Urgency::Critical, } } } -// TODO: make this the default in v5.0 -#[cfg(feature = "server")] -impl From for Urgency { - fn from(int: u8) -> Urgency { - match int { - 0 => Urgency::Low, - 1 => Urgency::Normal, - 2..=std::u8::MAX => Urgency::Critical, - } - } -} +// // TODO: make this the default in v5.0 +// #[cfg(feature = "server")] +// impl From for Urgency { +// fn from(int: u8) -> Urgency { +// match int { +// 0 => Urgency::Low, +// 1 => Urgency::Normal, +// 2..=std::u8::MAX => Urgency::Critical, +// } +// } +// } diff --git a/src/xdg/mod.rs b/src/xdg/mod.rs index e3fb8a1e..aa7698a5 100644 --- a/src/xdg/mod.rs +++ b/src/xdg/mod.rs @@ -467,15 +467,15 @@ pub struct ServerInformation { pub spec_version: String, } -/// Strictly internal. -/// The NotificationServer implemented here exposes a "Stop" function. -/// stops the notification server -#[cfg(all(feature = "server", unix, not(target_os = "macos")))] -#[doc(hidden)] -pub fn stop_server() { - #[cfg(feature = "dbus")] - dbus_rs::stop_server() -} +// /// Strictly internal. +// /// The NotificationServer implemented here exposes a "Stop" function. +// /// stops the notification server +// #[cfg(all(feature = "server", unix, not(target_os = "macos")))] +// #[doc(hidden)] +// pub fn stop_server() { +// #[cfg(feature = "dbus")] +// dbus_rs::stop_server() +// } /// Listens for the `ActionInvoked(UInt32, String)` Signal. /// From 4554ed53be608e0ef83546db293593e8d47df414 Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Tue, 10 Sep 2024 23:36:31 +0200 Subject: [PATCH 4/6] ci: add pull request template --- .github/pull_request_template.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..e729910f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,22 @@ +