diff --git a/base64/base64.rs b/base64/base64.rs index 6fed354e7..658b7d665 100644 --- a/base64/base64.rs +++ b/base64/base64.rs @@ -29,11 +29,10 @@ fn main() { let args = ~os::args(); let opts = ~[ optflag("d", "decode", "decode data"), - optflag("i", "ignore-garbage", - "when decoding, ignore non-alphabetic characters"), + optflag("i", "ignore-garbage", "when decoding, ignore non-alphabetic characters"), optopt("w", "wrap", - "wrap encoded lines after COLS character (default 76, 0 to \ - disable wrapping)", "COLS"), + "wrap encoded lines after COLS character (default 76, 0 to disable wrapping)", "COLS" + ), optflag("h", "help", "display this help text and exit"), optflag("V", "version", "output version information and exit") ]; @@ -46,8 +45,7 @@ fn main() { }; let progname = args[0].clone(); - let usage = usage("Base64 encode or decode FILE, or standard input, to \ - standard output.", opts); + let usage = usage("Base64 encode or decode FILE, or standard input, to standard output.", opts); let mode = if matches.opt_present("help") { Help } else if matches.opt_present("version") { @@ -62,8 +60,7 @@ fn main() { Some(s) => match from_str(s) { Some(s) => s, None => { - error!("error: {:s}", "Argument to option 'wrap' \ - improperly formatted."); + error!("error: {:s}", "Argument to option 'wrap' improperly formatted."); fail!() } }, diff --git a/tee/tee.rs b/tee/tee.rs index 543c5aabc..9242ec061 100644 --- a/tee/tee.rs +++ b/tee/tee.rs @@ -41,8 +41,10 @@ fn options(args: &[~str]) -> Result { let opts = ~[ optflag("a", "append", "append to the given FILEs, do not overwrite"), optflag("i", "ignore-interrupts", "ignore interrupt signals"), - optflag("", "help", "display this help and exit"), - optflag("", "version", "output version information and exit")]; + optflag("h", "help", "display this help and exit"), + optflag("V", "version", "output version information and exit"), + ]; + getopts(args.tail(), opts).map_err(|e| e.to_err_msg()).and_then(|m| { let version = format!("{} {}", NAME, VERSION); let program = args[0].clone();