Skip to content

Commit

Permalink
fix double must_use
Browse files Browse the repository at this point in the history
  • Loading branch information
xor-bits committed Feb 13, 2024
1 parent 8edade6 commit 0b9391f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions crates/vfs/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ pub enum Node<Mut> {
}

impl<Mut> Node<Mut> {
#[must_use]
pub fn try_as_file(&self) -> IoResult<FileRef<Mut>> {
match self {
Node::File(f) => Ok(f.clone()),
Node::Directory(_) => Err(IoError::IsADirectory),
}
}

#[must_use]
pub fn try_as_dir(&self) -> IoResult<DirRef<Mut>> {
match self {
Node::File(_) => Err(IoError::NotADirectory),
Expand Down

0 comments on commit 0b9391f

Please sign in to comment.