Skip to content

Commit

Permalink
Remove leftover Ok(())
Browse files Browse the repository at this point in the history
  • Loading branch information
tiif committed Sep 16, 2024
1 parent 6318df5 commit e17786f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/shims/unix/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ impl FileDescription for io::Stdout {
// the host -- there is no good in adding extra buffering
// here.
io::stdout().flush().unwrap();
ecx.return_written_byte_count_or_error(result, dest)?;
Ok(())
ecx.return_written_byte_count_or_error(result, dest)
}

fn is_tty(&self, communicate_allowed: bool) -> bool {
Expand All @@ -197,8 +196,7 @@ impl FileDescription for io::Stderr {
// We allow writing to stderr even with isolation enabled.
// No need to flush, stderr is not buffered.
let result = Write::write(&mut { self }, bytes);
ecx.return_written_byte_count_or_error(result, dest)?;
Ok(())
ecx.return_written_byte_count_or_error(result, dest)
}

fn is_tty(&self, communicate_allowed: bool) -> bool {
Expand All @@ -225,8 +223,7 @@ impl FileDescription for NullOutput {
) -> InterpResult<'tcx> {
// We just don't write anything, but report to the user that we did.
let result = Ok(bytes.len());
ecx.return_written_byte_count_or_error(result, dest)?;
Ok(())
ecx.return_written_byte_count_or_error(result, dest)
}
}

Expand Down

0 comments on commit e17786f

Please sign in to comment.