From cf5136d247dcb3329f5f4488d10258449423ae1e Mon Sep 17 00:00:00 2001 From: emma Date: Sat, 29 Jun 2024 07:49:47 -0600 Subject: [PATCH] Makefile, swab(1): fixes swab build --- Makefile | 6 ++---- src/swab.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8109cd6..8a9e936 100644 --- a/Makefile +++ b/Makefile @@ -133,10 +133,8 @@ build/bin/strcmp: src/strcmp.c build .PHONY: swab swab: build/bin/swab -build/bin/swab: src/swab.rs build build/o/libsysexits.rlib - $(RUSTC) $(RUSTFLAGS) --extern getopt=build/o/libgetopt.rlib \ - --extern sysexits=build/o/libsysexits.rlib \ - -o $@ src/swab.rs +build/bin/swab: src/swab.rs build rustlibs + $(RUSTC) $(RUSTFLAGS) $(RUSTLIBS) -o $@ src/swab.rs .PHONY: true true: build/bin/true diff --git a/src/swab.rs b/src/swab.rs index 810a6cb..d05b651 100644 --- a/src/swab.rs +++ b/src/swab.rs @@ -53,7 +53,7 @@ fn main() -> ExitCode { Ok("f") => force = true, Ok("w") => { if let Some(arg) = opt.arg() { - match opt.arg().parse::() { + match arg.parse::() { Ok(w) if w % 2 == 0 => { wordsize = w; () }, _ => { return usage(&argv[0]); }, }