Skip to content

Commit

Permalink
turn return statements into result expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
apparebit committed Oct 11, 2024
1 parent fdf5729 commit bb9952e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,14 +1117,14 @@ impl VtScanner {
pub fn bytes_on_finish(&self) -> std::io::Result<&[u8]> {
if self.did_complete() {
if self.did_overflow() {
return Err(ErrorKind::OutOfMemory.into());
Err(ErrorKind::OutOfMemory.into())
} else {
return Ok(self.completed_bytes());
Ok(self.completed_bytes())
}
} else if self.did_abort() {
return Err(ErrorKind::InvalidData.into());
Err(ErrorKind::InvalidData.into())
} else {
return Err(ErrorKind::Other.into());
Err(ErrorKind::Other.into())
}
}

Expand Down

0 comments on commit bb9952e

Please sign in to comment.