swab(1): use the getopt error message

This commit is contained in:
dtb 2024-07-08 14:34:42 -06:00
parent ca6865688a
commit b7bc1f16ad
Signed by: trinity
GPG Key ID: 34C0543BBB6AF81B

View File

@ -52,7 +52,7 @@ fn main() -> ExitCode {
let mut optind: usize = 1; // argv[0] let mut optind: usize = 1; // argv[0]
let mut wordsize: usize = 2; // Equivalent to dd(1p). let mut wordsize: usize = 2; // Equivalent to dd(1p).
while let Some(opt) = argv.getopt(":w:") { while let Some(opt) = argv.getopt("w:") {
match opt.opt() { match opt.opt() {
Ok("w") => { Ok("w") => {
match opt.arg().unwrap().parse::<usize>() { match opt.arg().unwrap().parse::<usize>() {