@@ -6,8 +6,8 @@ mod paths;
66
77use std:: process:: Command ;
88use std:: sync:: {
9- atomic:: { AtomicBool , Ordering } ,
109 Arc ,
10+ atomic:: { AtomicBool , Ordering } ,
1111} ;
1212use std:: thread;
1313use std:: time:: { Duration , Instant } ;
@@ -16,11 +16,11 @@ use ctrlc;
1616use env_logger;
1717use log:: { error, info, warn} ;
1818use something_bg_core:: platform:: AppPaths ;
19- use tray_icon:: { Icon , TrayIcon , TrayIconBuilder } ;
2019use tray_icon:: menu:: MenuEvent ;
20+ use tray_icon:: { Icon , TrayIcon , TrayIconBuilder } ;
2121
2222use crate :: app:: AppState ;
23- use crate :: menu:: { build_id_lookup , build_menu , refresh_task_labels , MenuAction , MenuHandles } ;
23+ use crate :: menu:: { MenuAction , MenuHandles , build_id_lookup , build_menu , refresh_task_labels } ;
2424
2525fn main ( ) {
2626 env_logger:: init ( ) ;
@@ -153,7 +153,10 @@ impl EventLoop {
153153
154154fn open_config ( paths : & Arc < crate :: paths:: WindowsPaths > ) {
155155 let config_path = paths. config_path ( ) ;
156- let parent = config_path. parent ( ) . map ( |p| p. to_path_buf ( ) ) . unwrap_or ( config_path) ;
156+ let parent = config_path
157+ . parent ( )
158+ . map ( |p| p. to_path_buf ( ) )
159+ . unwrap_or ( config_path) ;
157160
158161 info ! ( "opening config folder at {:?}" , parent) ;
159162 let result = Command :: new ( "explorer.exe" ) . arg ( & parent) . spawn ( ) ;
@@ -165,10 +168,7 @@ fn open_config(paths: &Arc<crate::paths::WindowsPaths>) {
165168fn open_about ( ) {
166169 let url = "https://github.com/vim-zz/something_bg" ;
167170 info ! ( "opening project page: {url}" ) ;
168- if let Err ( e) = Command :: new ( "cmd" )
169- . args ( [ "/C" , "start" , url] )
170- . spawn ( )
171- {
171+ if let Err ( e) = Command :: new ( "cmd" ) . args ( [ "/C" , "start" , url] ) . spawn ( ) {
172172 warn ! ( "failed to open browser: {e}" ) ;
173173 }
174174}
0 commit comments