Skip to content

Commit

Permalink
fix and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuminn committed Nov 19, 2020
1 parent e6aa458 commit 76566d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/detections/detection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ impl Detection {
//&other.detection();
}
}
Err(_) => break,
Err(err) => {
println!("{}", err);
break;
},
}
}
Err(e) => eprintln!("{}", e),
Expand Down
9 changes: 2 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ use rusty_blue::detections::detection;
use std::{fs, path::PathBuf, process};

fn main() -> Result<(), DeError> {
let filepath: String = configs::singleton()
.args
.value_of("filepath")
.unwrap_or("")
.to_string();
if filepath != "" {
parse_file(&filepath);
if let Some(filepath) = configs::singleton().args.value_of("filepath") {
parse_file(&filepath.to_string());
}

Ok(())
Expand Down

0 comments on commit 76566d3

Please sign in to comment.