chore: some new linting (#201)

* chore: some new linting

* chore: some more linting

* chore: rustfmt
This commit is contained in:
Conrad Ludgate
2021-11-13 22:40:24 +00:00
committed by GitHub
parent 27d3d81afe
commit 8f91b1410c
5 changed files with 29 additions and 69 deletions

View File

@ -133,14 +133,11 @@ mod test {
// test decryption works
// this should pass
match decrypt(&e1, &key1) {
Err(e) => assert!(false, "failed to decrypt, got {}", e),
Err(e) => panic!("failed to decrypt, got {}", e),
Ok(h) => assert_eq!(h, history),
};
// this should err
match decrypt(&e2, &key1) {
Ok(_) => assert!(false, "expected an error decrypting with invalid key"),
Err(_) => {}
};
decrypt(&e2, &key1).expect_err("expected an error decrypting with invalid key");
}
}

View File

@ -73,7 +73,6 @@ pub struct Resh {
file: BufReader<File>,
strbuf: String,
loc: usize,
counter: i64,
}
impl Importer for Resh {
@ -95,7 +94,6 @@ impl Importer for Resh {
file: buf,
strbuf: String::new(),
loc,
counter: 0,
})
}
}