clippy: use write_all in file logger

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-09-11 13:56:09 +02:00
parent 5a54935bc9
commit 175eeb870d
1 changed files with 3 additions and 3 deletions

View File

@ -52,12 +52,12 @@ impl FileLogger {
let mut stdout = std::io::stdout(); let mut stdout = std::io::stdout();
if self.to_stdout { if self.to_stdout {
stdout.write(msg.as_bytes()).unwrap(); stdout.write_all(msg.as_bytes()).unwrap();
stdout.write(b"\n").unwrap(); stdout.write_all(b"\n").unwrap();
} }
let line = format!("{}: {}\n", Local.timestamp(Local::now().timestamp(), 0).to_rfc3339(), msg); let line = format!("{}: {}\n", Local.timestamp(Local::now().timestamp(), 0).to_rfc3339(), msg);
self.file.write(line.as_bytes()).unwrap(); self.file.write_all(line.as_bytes()).unwrap();
} }
} }