diff --git a/src/swab.rs b/src/swab.rs index 4dc86de..6afed28 100644 --- a/src/swab.rs +++ b/src/swab.rs @@ -38,17 +38,17 @@ use strerror::StrError; fn oserr(argv0: &str, e: Error) -> ExitCode { eprintln!("{}: {}", argv0, e.strerror()); - ExitCode::from(EX_OSERR as u8) + ExitCode::from(EX_OSERR) } fn ioerr(argv0: &str, e: Error) -> ExitCode { eprintln!("{}: {}", argv0, e.strerror()); - ExitCode::from(EX_IOERR as u8) + ExitCode::from(EX_IOERR) } fn usage(s: &str) -> ExitCode { eprintln!("Usage: {} [-w word_size]", s); - ExitCode::from(EX_USAGE as u8) + ExitCode::from(EX_USAGE) } fn main() -> ExitCode { @@ -88,7 +88,7 @@ fn main() -> ExitCode { loop { match input.read(&mut buf) { - Ok(0) => break ExitCode::from(EX_OK as u8), // read nothing; bye + Ok(0) => break ExitCode::from(EX_OK), // read nothing; bye Ok(v) if v == wordsize => { // read full block; swab let (left, right) = buf.split_at(v/2);