Skip to content

Commit

Permalink
Fix clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
GRVYDEV committed Jan 16, 2021
1 parent a31bcd8 commit 426935b
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
None => SimpleLogger::new(LevelFilter::Info, Config::default()),
},
);
match matches.value_of("log-file") {
Some(path) => {
if !path.is_empty() {
loggers.push(WriteLogger::new(
LevelFilter::Info,
Config::default(),
File::create(path).unwrap(),
))
} else {
}
if let Some(path) = matches.value_of("log-file"){
if !path.is_empty(){
loggers.push(WriteLogger::new(
LevelFilter::Info,
Config::default(),
File::create(path).unwrap(),
))
}
None => (),
};
let _ = CombinedLogger::init(loggers);

Expand Down

0 comments on commit 426935b

Please sign in to comment.