Skip to content

Commit

Permalink
remove some unnecessary return
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Apr 24, 2024
1 parent bad2ca9 commit d36af33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/encryptedfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ impl EncryptedFs {
let keys: Vec<u64> = self.read_handles.keys().cloned().collect();
for key in keys {
let (attr, _, _, _) = self.read_handles.get(&key).unwrap();
if attr.ino != ino{
if attr.ino != ino {
continue;
}
let (attr, _, _, lock) = self.read_handles.remove(&key).unwrap();
Expand All @@ -1080,8 +1080,8 @@ impl EncryptedFs {
fn check_password(&mut self) -> FsResult<()> {
match self.get_inode(ROOT_INODE) {
Ok(_) => Ok(()),
Err(FsError::SerializeError(_)) => return Err(FsError::InvalidPassword),
Err(err) => return Err(err),
Err(FsError::SerializeError(_)) => Err(FsError::InvalidPassword),
Err(err) => Err(err),
}
}

Expand Down

0 comments on commit d36af33

Please sign in to comment.