diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-09-27 15:36:13 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-09-27 15:36:13 +0200 |
| commit | e830dad2b1e00a2ef46382dfe71c80b0406686e8 (patch) | |
| tree | eb7db04951974780a61c0c4ad948c5e1c3b360fa /mullvad-problem-report/src/main.rs | |
| parent | 00b0ba04092e97f3724260b943f3b138e8eb7b01 (diff) | |
| parent | 763d5e200947d616865ec3292c27347739d2d386 (diff) | |
| download | mullvadvpn-e830dad2b1e00a2ef46382dfe71c80b0406686e8.tar.xz mullvadvpn-e830dad2b1e00a2ef46382dfe71c80b0406686e8.zip | |
Merge branch 'update-rustfmt'
Diffstat (limited to 'mullvad-problem-report/src/main.rs')
| -rw-r--r-- | mullvad-problem-report/src/main.rs | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/mullvad-problem-report/src/main.rs b/mullvad-problem-report/src/main.rs index a76fb79544..cc5ff62ef3 100644 --- a/mullvad-problem-report/src/main.rs +++ b/mullvad-problem-report/src/main.rs @@ -107,14 +107,16 @@ fn run() -> Result<()> { .value_name("PATH") .takes_value(true) .required(true), - ).arg( + ) + .arg( clap::Arg::with_name("extra_logs") .help("Paths to additional log files to be included.") .multiple(true) .value_name("EXTRA LOGS") .takes_value(true) .required(false), - ).arg( + ) + .arg( clap::Arg::with_name("redact") .help("List of words and expressions to remove from the report") .long("redact") @@ -122,7 +124,8 @@ fn run() -> Result<()> { .multiple(true) .takes_value(true), ), - ).subcommand( + ) + .subcommand( clap::SubCommand::with_name("send") .about("Send collected problem report") .arg( @@ -132,14 +135,16 @@ fn run() -> Result<()> { .help("The path to previously collected report file.") .takes_value(true) .required(true), - ).arg( + ) + .arg( clap::Arg::with_name("email") .long("email") .short("e") .help("Reporter's email") .takes_value(true) .required(false), - ).arg( + ) + .arg( clap::Arg::with_name("message") .long("message") .short("m") @@ -183,11 +188,13 @@ fn collect_report( let mut other_logs = Vec::new(); for log in logs { match log { - Ok(path) => if is_tunnel_log(&path) { - problem_report.add_log(&path); - } else { - other_logs.push(path); - }, + Ok(path) => { + if is_tunnel_log(&path) { + problem_report.add_log(&path); + } else { + other_logs.push(path); + } + } Err(error) => problem_report.add_error("Unable to get log path", error), } } |
