From 0d982c24be0e1d7b686a4f2e4397007568d20ca5 Mon Sep 17 00:00:00 2001 From: SpikeHD <25207995+SpikeHD@users.noreply.github.com> Date: Mon, 16 Dec 2024 18:44:10 -0800 Subject: [PATCH] fix: fmt --- src-tauri/src/util/helpers.rs | 6 ++++-- src-tauri/src/util/notifications.rs | 21 ++++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src-tauri/src/util/helpers.rs b/src-tauri/src/util/helpers.rs index 2fa5130..cc85009 100644 --- a/src-tauri/src/util/helpers.rs +++ b/src-tauri/src/util/helpers.rs @@ -83,7 +83,9 @@ pub fn get_platform() -> &'static str { #[cfg(target_os = "windows")] pub fn is_windows_7() -> bool { - use windows::{Wdk::System::SystemServices::RtlGetVersion, Win32::System::SystemInformation::OSVERSIONINFOW}; + use windows::{ + Wdk::System::SystemServices::RtlGetVersion, Win32::System::SystemInformation::OSVERSIONINFOW, + }; let mut osvi = OSVERSIONINFOW::default(); osvi.dwOSVersionInfoSize = std::mem::size_of::() as u32; @@ -93,4 +95,4 @@ pub fn is_windows_7() -> bool { } osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1 -} \ No newline at end of file +} diff --git a/src-tauri/src/util/notifications.rs b/src-tauri/src/util/notifications.rs index fc96cf0..d6370ec 100644 --- a/src-tauri/src/util/notifications.rs +++ b/src-tauri/src/util/notifications.rs @@ -56,7 +56,12 @@ pub fn send_notification(win: tauri::WebviewWindow, title: String, body: String, send_notification_internal(app, title, body, icon_path.clone()); } -fn send_notification_internal(app: &tauri::AppHandle, title: String, body: String, icon_path: String) { +fn send_notification_internal( + app: &tauri::AppHandle, + title: String, + body: String, + icon_path: String, +) { #[cfg(target_os = "windows")] { if !is_windows_7() { @@ -70,7 +75,12 @@ fn send_notification_internal(app: &tauri::AppHandle, title: String, body: Strin send_notification_internal_other(app, title, body, icon_path) } -fn send_notification_internal_other(app: &tauri::AppHandle, title: String, body: String, icon: String) { +fn send_notification_internal_other( + app: &tauri::AppHandle, + title: String, + body: String, + icon: String, +) { use tauri_plugin_notification::NotificationExt; app @@ -83,7 +93,12 @@ fn send_notification_internal_other(app: &tauri::AppHandle, title: String, body: .unwrap_or_default(); } -fn send_notification_internal_windows(app: &tauri::AppHandle, title: String, body: String, icon: String) { +fn send_notification_internal_windows( + app: &tauri::AppHandle, + title: String, + body: String, + icon: String, +) { use crate::util::window_helpers::ultrashow; use std::path::Path; use tauri_winrt_notification::{IconCrop, Toast};