From 982c67df13d1fba8d296bb7d4f79d2d92279882a Mon Sep 17 00:00:00 2001 From: emma Date: Tue, 1 Oct 2024 22:08:56 -0600 Subject: [PATCH] intcmp(1), swab(1): consistent type annotations --- src/intcmp.rs | 2 +- src/swab.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intcmp.rs b/src/intcmp.rs index 7bd4819..5f8f64e 100644 --- a/src/intcmp.rs +++ b/src/intcmp.rs @@ -39,7 +39,7 @@ fn err(argv0: &String, e: String, code: u8) -> ExitCode { ExitCode::from(code) } -fn usage(argv0: &str) -> ExitCode { +fn usage(argv0: &String) -> ExitCode { eprintln!("Usage: {} [-egl] integer integer...", argv0); ExitCode::from(EX_USAGE) } diff --git a/src/swab.rs b/src/swab.rs index 4dd0021..e167230 100644 --- a/src/swab.rs +++ b/src/swab.rs @@ -35,12 +35,12 @@ use strerror::StrError; #[cfg(target_os="openbsd")] extern crate openbsd; #[cfg(target_os="openbsd")] use openbsd::{ Promises, pledge, unveil }; -fn err(argv0: &str, e: Error, code: u8) -> ExitCode { +fn err(argv0: &String, e: Error, code: u8) -> ExitCode { eprintln!("{}: {}", argv0, e.strerror()); ExitCode::from(code) } -fn usage(s: &str) -> ExitCode { +fn usage(s: &String) -> ExitCode { eprintln!("Usage: {} [-w word_size]", s); ExitCode::from(EX_USAGE) }