Skip to content

Commit e17786f

Browse files
committed
Remove leftover Ok(())
1 parent 6318df5 commit e17786f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/shims/unix/fd.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ impl FileDescription for io::Stdout {
172172
// the host -- there is no good in adding extra buffering
173173
// here.
174174
io::stdout().flush().unwrap();
175-
ecx.return_written_byte_count_or_error(result, dest)?;
176-
Ok(())
175+
ecx.return_written_byte_count_or_error(result, dest)
177176
}
178177

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

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

0 commit comments

Comments
 (0)