Skip to content

Commit

Permalink
Fix more clippy lints (#3015)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored Nov 4, 2022
1 parent 97c881d commit b4365eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions object_store/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,16 +803,16 @@ fn open_file(path: &PathBuf) -> Result<File> {
}

fn open_writable_file(path: &PathBuf) -> Result<File> {
match File::create(&path) {
match File::create(path) {
Ok(f) => Ok(f),
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {
let parent = path
.parent()
.context(UnableToCreateFileSnafu { path: &path, err })?;
std::fs::create_dir_all(&parent)
std::fs::create_dir_all(parent)
.context(UnableToCreateDirSnafu { path: parent })?;

match File::create(&path) {
match File::create(path) {
Ok(f) => Ok(f),
Err(err) => Err(Error::UnableToCreateFile {
path: path.to_path_buf(),
Expand Down

0 comments on commit b4365eb

Please sign in to comment.