From cf744efc1b13d7482c2f234c9f05490e443bb8f3 Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 7 Jul 2024 18:21:48 -0600 Subject: [PATCH] swab(1): fixes not using strerror(3) --- src/swab.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/swab.rs b/src/swab.rs index e723819..5942c38 100644 --- a/src/swab.rs +++ b/src/swab.rs @@ -29,8 +29,11 @@ use getopt::GetOpt; extern crate sysexits; use sysexits::{ EX_OK, EX_OSERR, EX_USAGE }; +extern crate strerror; +use strerror::StrError; + fn oserr(s: &str, e: Error) -> ExitCode { - eprintln!("{}: {}", s, e); + eprintln!("{}: {}", s, e.strerror()); ExitCode::from(EX_OSERR as u8) }