swab(1): fix type errors

This commit is contained in:
dtb 2024-07-29 11:13:58 -06:00
parent 7b930363bf
commit c554b96722
Signed by: trinity
GPG Key ID: 34C0543BBB6AF81B

View File

@ -75,20 +75,20 @@ fn main() -> ExitCode {
if let Err(e) = output.write(&right) if let Err(e) = output.write(&right)
.and_then(|_| output.write(&left)) { .and_then(|_| output.write(&left)) {
err(&argv[0], e); err(&argv[0], e);
break EX_IOERR // write error break ExitCode::from(EX_IOERR as u8) // write error
} }
}, },
Ok(v) => { // partial read; partially write Ok(v) => { // partial read; partially write
if let Err(e) = output.write(&buf[..v]) { if let Err(e) = output.write(&buf[..v]) {
err(&argv[0], e); err(&argv[0], e);
break EX_IOERR // write error break ExitCode::from(EX_IOERR as u8) // write error
} }
}, },
Err(e) if e.kind() == ErrorKind::Interrupted && force => continue, Err(e) if e.kind() == ErrorKind::Interrupted && force => continue,
Err(e) => { Err(e) => {
err(&argv[0], e); err(&argv[0], e);
break EX_IOERR // read error (or signal) break ExitCode::from(EX_IOERR as u8) // read error (or signal)
} }
} }
} }