From 505e850afab903797eba40bdc6c852f09dfa186f Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Mon, 16 Nov 2020 21:14:29 +0100 Subject: clean up conditional compilation --- 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 eaed3dc..ee387cc 100644 --- a/mumd/src/notify.rs +++ b/mumd/src/notify.rs @@ -1,9 +1,9 @@ pub fn init() { - #[cfg(any(feature = "notifications", feature = "all"))] + #[cfg(feature = "notifications")] libnotify::init("mumd").unwrap(); } -#[cfg(any(feature = "notifications", feature = "all"))] +#[cfg(feature = "notifications")] 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(any(feature = "notifications", feature = "all")))] +#[cfg(not(feature = "notifications"))] pub fn send(_: String) -> Option { None } -- cgit v1.2.1