mirror of
https://github.com/nushell/nushell.git
synced 2025-07-02 23:51:49 +02:00
Fix warnings for Rust 1.51 (#3214)
* Fix warnings for Rust 1.51 * More fixes * More fixes
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user