Skip to content

Commit

Permalink
build: remove redundant extra zbus deps
Browse files Browse the repository at this point in the history
these are reexported by zbus now
  • Loading branch information
hoodie committed Dec 10, 2022
1 parent 396a013 commit 61a0265
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ include = [
dbus = { version = "0.9", optional = true }
lazy_static = { version = "1", optional = true }
image = { version = "0.24", optional = true }
zvariant = { version = "3", optional = true }
zvariant_derive = { version = "3", optional = true }
zbus = { version = "3.5", optional = true }
serde = { version = "1", optional = true }

Expand All @@ -40,7 +38,7 @@ winrt-notification = { package = "tauri-winrt-notification", version = "0.1" }
default = ["z"]
server = []
d = ["dbus"]
z = ["zbus", "zvariant", "zvariant_derive", "serde"]
z = ["zbus", "serde"]
debug_namespace = []
images = ["image", "lazy_static"]

Expand Down
5 changes: 4 additions & 1 deletion src/hints.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![cfg_attr(rustfmt, rustfmt_skip)]

mod constants;
#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))]
use zbus::zvariant;

#[cfg(all(unix, not(target_os = "macos")))]
pub(crate) mod message;
Expand All @@ -15,6 +16,7 @@ use crate::Urgency;
#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] use crate::notification::Notification;
#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] use std::collections::HashMap;

mod constants;

#[cfg(all(unix, not(target_os = "macos")))]
#[derive(Eq, PartialEq, Hash, Clone, Debug)]
Expand Down Expand Up @@ -151,6 +153,7 @@ impl Hint {}
fn test_hints_to_map() {

// custom value should only be there once if the names are identical

let n1 = crate::Notification::new()
.hint(Hint::Custom("foo".into(), "bar1".into()))
.hint(Hint::Custom("foo".into(), "bar2".into()))
Expand Down
4 changes: 3 additions & 1 deletion src/xdg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#[cfg(feature = "dbus")]
use dbus::ffidisp::Connection as DbusConnection;
#[cfg(feature = "zbus")]
use zbus::zvariant;

use crate::{error::*, notification::Notification};

Expand Down Expand Up @@ -404,7 +406,7 @@ pub fn get_server_information() -> Result<ServerInformation> {
/// Return value of `get_server_information()`.
#[derive(Debug)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[cfg_attr(feature = "zbus", derive(zvariant_derive::Type))]
#[cfg_attr(feature = "zbus", derive(zvariant::Type))]
pub struct ServerInformation {
/// The product name of the server.
pub name: String,
Expand Down

0 comments on commit 61a0265

Please sign in to comment.