From 6c980ecd36408365f627656f907d7ae1220f5bab Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 18 Apr 2024 11:26:23 +0800 Subject: [PATCH] clippy & format --- src/config.rs | 9 +++++++-- src/lib.rs | 2 +- src/trayicon.rs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 381738f..7577036 100644 --- a/src/config.rs +++ b/src/config.rs @@ -280,12 +280,17 @@ pub(crate) fn open_config_file() -> Result<()> { .spawn() .map_err(|err| anyhow!("Failed to open config file '{}', {err}", filepath.display()))? .wait() - .map_err(|err| anyhow!("Failed to close config file '{}', {err}", filepath.display()))?; + .map_err(|err| { + anyhow!( + "Failed to close config file '{}', {err}", + filepath.display() + ) + })?; if exit.success() { // restart } - + Ok(()) } diff --git a/src/lib.rs b/src/lib.rs index d627e45..4ee9c5d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,4 +13,4 @@ mod startup; mod trayicon; pub use crate::app::start; -pub use crate::config::{Config, load_config}; +pub use crate::config::{load_config, Config}; diff --git a/src/trayicon.rs b/src/trayicon.rs index f20e360..b4fccef 100644 --- a/src/trayicon.rs +++ b/src/trayicon.rs @@ -1,4 +1,4 @@ -use crate::app::{IDM_EXIT, IDM_STARTUP, IDM_CONFIGURE, NAME, WM_USER_TRAYICON}; +use crate::app::{IDM_CONFIGURE, IDM_EXIT, IDM_STARTUP, NAME, WM_USER_TRAYICON}; use anyhow::{anyhow, Result}; use windows::core::w;