summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-03-01 14:03:34 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-03-05 21:37:20 +0100
commitb0c2416dd5460a2bdb36887f2805d2e09b538533 (patch)
tree4c22b0f0e190d431bf053dd79c154af5d49ed13d
parent55aa556fce0e0ba04fbbcb6827631dec6ab6e33d (diff)
downloadmullvadvpn-b0c2416dd5460a2bdb36887f2805d2e09b538533.tar.xz
mullvadvpn-b0c2416dd5460a2bdb36887f2805d2e09b538533.zip
Fix formatting
-rw-r--r--mullvad-daemon/src/bin/problem-report.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/mullvad-daemon/src/bin/problem-report.rs b/mullvad-daemon/src/bin/problem-report.rs
index e13116ca5d..d0b1cf9285 100644
--- a/mullvad-daemon/src/bin/problem-report.rs
+++ b/mullvad-daemon/src/bin/problem-report.rs
@@ -10,19 +10,19 @@
extern crate clap;
#[macro_use]
extern crate error_chain;
-extern crate regex;
#[macro_use]
extern crate lazy_static;
+extern crate regex;
extern crate mullvad_rpc;
use error_chain::ChainedError;
use regex::Regex;
+use std::borrow::Cow;
use std::cmp::min;
use std::collections::HashMap;
use std::env;
-use std::borrow::Cow;
use std::fmt;
use std::fs::File;
use std::io::{self, Read, Seek, SeekFrom, Write};
@@ -198,11 +198,9 @@ impl ProblemReport {
/// Attach file log to this report. This method uses the error chain instead of log
/// contents if error occurred when reading log file.
pub fn add_log(&mut self, path: &Path) {
- let content = self.redact(
- &read_file_lossy(path, LOG_MAX_READ_BYTES)
- .chain_err(|| ErrorKind::ReadLogError(path.to_path_buf()))
- .unwrap_or_else(|e| e.display_chain().to_string()),
- );
+ let content = self.redact(&read_file_lossy(path, LOG_MAX_READ_BYTES)
+ .chain_err(|| ErrorKind::ReadLogError(path.to_path_buf()))
+ .unwrap_or_else(|e| e.display_chain().to_string()));
let path = self.redact(&path.to_string_lossy());
self.logs.push((path, content));
}