From 292ba0307ebcf14ab8362f8f8f276a67d38a93ea Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Mon, 16 Nov 2020 19:48:27 +0100 Subject: change some things with extra features --- mumd/src/notify.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mumd/src/notify.rs') diff --git a/mumd/src/notify.rs b/mumd/src/notify.rs index 0739c58..eaed3dc 100644 --- a/mumd/src/notify.rs +++ b/mumd/src/notify.rs @@ -1,9 +1,9 @@ pub fn init() { - #[cfg(feature = "libnotify")] + #[cfg(any(feature = "notifications", feature = "all"))] libnotify::init("mumd").unwrap(); } -#[cfg(feature = "libnotify")] +#[cfg(any(feature = "notifications", feature = "all"))] pub fn send(msg: String) -> Option { match libnotify::Notification::new("mumd", Some(msg.as_str()), None).show() { Ok(_) => Some(true), @@ -14,7 +14,7 @@ pub fn send(msg: String) -> Option { } } -#[cfg(not(feature = "libnotify"))] +#[cfg(not(any(feature = "notifications", feature = "all")))] pub fn send(_: String) -> Option { None } -- cgit v1.2.1