matchを使わない形に修正

This commit is contained in:
akiranishikawa
2020-09-29 20:07:45 +09:00
parent a542406ee5
commit 9c8ca18b5f
4 changed files with 51 additions and 66 deletions

View File

@@ -4,7 +4,7 @@ extern crate serde;
use clap::{App, AppSettings, Arg};
use evtx::EvtxParser;
use quick_xml::de::DeError;
use std::{env, path::PathBuf, process};
use std::{path::PathBuf, process};
use yamato_event_analyzer::detections::detection;
fn build_app() -> clap::App<'static, 'static> {
@@ -38,9 +38,8 @@ fn main() -> Result<(), DeError> {
let args = build_app().get_matches();
let filepath: Option<&str> = args.value_of("filepath");
match filepath {
Some(filepath) => parse_file(filepath),
None => (),
if let Some(filepath) = filepath {
parse_file(filepath);
}
Ok(())