Fix warnings for Rust 1.51 (#3214)

* Fix warnings for Rust 1.51

* More fixes

* More fixes
This commit is contained in:
Jonathan Turner
2021-03-26 21:26:57 +13:00
committed by GitHub
parent 589fc0b8ad
commit 7e184b58b2
55 changed files with 325 additions and 400 deletions

View File

@ -196,8 +196,8 @@ pub fn delete_file_at(full_path: impl AsRef<Path>) {
pub fn create_file_at(full_path: impl AsRef<Path>) -> Result<(), std::io::Error> {
let full_path = full_path.as_ref();
if let Some(parent) = full_path.parent() {
panic!(format!("{:?} exists", parent.display()));
if full_path.parent().is_some() {
panic!("path exists");
}
std::fs::write(full_path, b"fake data")