4
0
yicong 2 өдөр өмнө
parent
commit
9857977042

+ 1 - 1
src/config/mod.rs

@@ -13,4 +13,4 @@ pub struct CmdConfig {
     /// log level
     /// log level
     #[arg(value_enum, short, long, default_value = "warn")]
     #[arg(value_enum, short, long, default_value = "warn")]
     pub level: LevelFilter,
     pub level: LevelFilter,
-}
+}

+ 1 - 1
src/main.rs

@@ -24,7 +24,7 @@ use crate::errors::*;
 pub static mut APPLICATION: Option<Application> = None;
 pub static mut APPLICATION: Option<Application> = None;
 
 
 pub fn get_application() -> &'static mut Application {
 pub fn get_application() -> &'static mut Application {
-    unsafe { APPLICATION.as_mut().unwrap()}
+    unsafe { APPLICATION.as_mut().unwrap() }
 }
 }
 
 
 fn main() -> Result<()> {
 fn main() -> Result<()> {

+ 5 - 7
src/util/log_util.rs

@@ -7,13 +7,11 @@ pub struct Log;
 
 
 impl Log {
 impl Log {
     pub fn init(level: LevelFilter) -> io::Result<()> {
     pub fn init(level: LevelFilter) -> io::Result<()> {
-        CombinedLogger::init(vec![
-            WriteLogger::new(
-                level,
-                simplelog::Config::default(),
-                File::create("held.log")?,
-            ),
-        ])
+        CombinedLogger::init(vec![WriteLogger::new(
+            level,
+            simplelog::Config::default(),
+            File::create("held.log")?,
+        )])
         .unwrap();
         .unwrap();
 
 
         Ok(())
         Ok(())

+ 1 - 1
src/util/mod.rs

@@ -1,2 +1,2 @@
 pub mod line_iterator;
 pub mod line_iterator;
-pub mod log_util;
+pub mod log_util;