diff options
| author | Eskil Queseth <eskilq@kth.se> | 2020-11-16 21:14:29 +0100 |
|---|---|---|
| committer | Eskil Queseth <eskilq@kth.se> | 2020-11-16 21:14:29 +0100 |
| commit | 505e850afab903797eba40bdc6c852f09dfa186f (patch) | |
| tree | 805c2ac76797d02d318caaa472cd6b91bf32e30f /mumd/src/notify.rs | |
| parent | 292ba0307ebcf14ab8362f8f8f276a67d38a93ea (diff) | |
| download | mum-505e850afab903797eba40bdc6c852f09dfa186f.tar.gz | |
clean up conditional compilation
Diffstat (limited to 'mumd/src/notify.rs')
| -rw-r--r-- | mumd/src/notify.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<bool> { match libnotify::Notification::new("mumd", Some(msg.as_str()), None).show() { Ok(_) => Some(true), @@ -14,7 +14,7 @@ pub fn send(msg: String) -> Option<bool> { } } -#[cfg(not(any(feature = "notifications", feature = "all")))] +#[cfg(not(feature = "notifications"))] pub fn send(_: String) -> Option<bool> { None } |
