Appease clippy
This commit is contained in:
parent
533a2f448d
commit
5ba9e8695e
|
@ -22,7 +22,7 @@ struct TestCase {
|
|||
|
||||
impl TestCase {
|
||||
fn new(parts: &'static [&'static str]) -> Self {
|
||||
assert!(parts.len() >= 1);
|
||||
assert!(!parts.is_empty());
|
||||
TestCase {
|
||||
parts,
|
||||
test_bbl: true,
|
||||
|
@ -71,7 +71,7 @@ impl TestCase {
|
|||
|
||||
// Check that outputs match expectations.
|
||||
|
||||
p.push(&self.parts[self.parts.len() - 1]);
|
||||
p.push(self.parts[self.parts.len() - 1]);
|
||||
|
||||
let files = mem.files.borrow();
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ impl<'a> ExpectedFile<'a> {
|
|||
.unwrap_or_else(|_| panic!("couldn't get path relative to test root {:?}", path))
|
||||
.to_str()
|
||||
.unwrap_or_else(|| panic!("couldn't Unicode-ify file name of {:?}", path))
|
||||
.replace(|c| std::path::is_separator(c), "_");
|
||||
.replace(std::path::is_separator, "_");
|
||||
|
||||
let mut f = File::open(path).unwrap_or_else(|_| panic!("failed to open {:?}", path));
|
||||
let mut contents = Vec::new();
|
||||
|
@ -214,7 +214,7 @@ impl<'a> ExpectedFile<'a> {
|
|||
.unwrap_or_else(|_| panic!("couldn't get path relative to test root {:?}", pbase))
|
||||
.to_str()
|
||||
.unwrap_or_else(|| panic!("couldn't Unicode-ify file name of {:?}", pbase))
|
||||
.replace(|c| std::path::is_separator(c), "_");
|
||||
.replace(std::path::is_separator, "_");
|
||||
|
||||
let mut dec = GzDecoder::new(File::open(&pbase).unwrap());
|
||||
let mut contents = Vec::new();
|
||||
|
|
Loading…
Reference in New Issue