From dcbf6f5ca05f1dd3ea10e214da01624dee22c038 Mon Sep 17 00:00:00 2001 From: aspen Date: Tue, 23 Feb 2021 13:32:46 -0500 Subject: [PATCH] This should be in `setup`, really. --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e5ff311..1307a25 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -173,14 +173,14 @@ struct MacOs; #[cfg(target_os = "macos")] impl Platform for MacOs { fn setup() -> Self { - MacOs - } - - fn notify(msg_title: &str, msg_body: &str) -> Result<(), ErrorRepr> { APP_SET.call_once(|| { let bundle = mac_notification_sys::get_bundle_identifier("Script Editor").unwrap(); mac_notification_sys::set_application(&bundle).unwrap(); }); + MacOs + } + + fn notify(msg_title: &str, msg_body: &str) -> Result<(), ErrorRepr> { mac_notification_sys::send_notification(msg_title, &None, msg_body, &None).unwrap(); Ok(()) } -- 2.51.2