Fix some warnings in future Rust nightlies

This commit is contained in:
Simon Sapin 2020-01-02 16:41:47 +01:00
parent 7281336116
commit fdcc7653f2
8 changed files with 20 additions and 45 deletions

View file

@ -19,7 +19,6 @@ use servo_config::opts::OutputOptions;
use std::borrow::ToOwned;
use std::cmp::Ordering;
use std::collections::{BTreeMap, HashMap};
use std::error::Error;
use std::fs::File;
use std::io::{self, Write};
use std::path::Path;
@ -397,11 +396,7 @@ impl Profiler {
Some(OutputOptions::FileName(ref filename)) => {
let path = Path::new(&filename);
let mut file = match File::create(&path) {
Err(e) => panic!(
"Couldn't create {}: {}",
path.display(),
Error::description(&e)
),
Err(e) => panic!("Couldn't create {}: {}", path.display(), e),
Ok(file) => file,
};
write!(