Skip to content

Commit

Permalink
chore: linting cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Nov 30, 2024
1 parent 4b02570 commit ae3158c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions warp/src/constellation/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,17 +516,17 @@ impl Directory {
}
let name = path.remove(0);
let item = self.get_item(name)?;
return match item {
match item {
Item::Directory(dir) => {
if path.is_empty() {
return Ok(dir);
}
return Ok(dir
Ok(dir
.get_last_directory_from_path(path.join("/").as_str())
.unwrap_or(dir));
.unwrap_or(dir))
}
_ => Err(Error::DirectoryNotFound),
};
}
}

/// Get an `Item` from a path
Expand Down Expand Up @@ -558,15 +558,15 @@ impl Directory {
}
let name = path.remove(0);
let item = self.get_item(name)?;
return match &item {
match &item {
Item::Directory(dir) => {
if path.is_empty() {
return Ok(item);
}
return dir.get_item_by_path(path.join("/").as_str());
dir.get_item_by_path(path.join("/").as_str())
}
_ => Ok(item),
};
}
}
}

Expand Down

0 comments on commit ae3158c

Please sign in to comment.