diff --git a/hostid/hostid.rs b/hostid/hostid.rs index 59ffd3dcf..122a2aa05 100644 --- a/hostid/hostid.rs +++ b/hostid/hostid.rs @@ -50,7 +50,7 @@ extern { } fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let opts = [ optflag("", "help", "display this help and exit"), diff --git a/md5sum/md5sum.rs b/md5sum/md5sum.rs index ff1fdc7ea..4bd30f9ae 100644 --- a/md5sum/md5sum.rs +++ b/md5sum/md5sum.rs @@ -28,7 +28,7 @@ static NAME: &'static str = "md5sum"; static VERSION: &'static str = "1.0.0"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); diff --git a/mkdir/mkdir.rs b/mkdir/mkdir.rs index 60a6b6016..acde243e8 100644 --- a/mkdir/mkdir.rs +++ b/mkdir/mkdir.rs @@ -29,7 +29,7 @@ static VERSION: &'static str = "1.0.0"; * Handles option parsing */ fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let opts = ~[ // Linux-specific options, not implemented diff --git a/paste/paste.rs b/paste/paste.rs index e7099ae6d..5dc76d9a5 100644 --- a/paste/paste.rs +++ b/paste/paste.rs @@ -24,7 +24,7 @@ static NAME: &'static str = "paste"; static VERSION: &'static str = "1.0.0"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ diff --git a/printenv/printenv.rs b/printenv/printenv.rs index 0c57c8444..33ecdc8f4 100644 --- a/printenv/printenv.rs +++ b/printenv/printenv.rs @@ -25,7 +25,7 @@ mod util; static NAME: &'static str = "printenv"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ getopts::optflag("0", "null", "end each output line with 0 byte rather than newline"), diff --git a/pwd/pwd.rs b/pwd/pwd.rs index 31eff1419..2b007b422 100644 --- a/pwd/pwd.rs +++ b/pwd/pwd.rs @@ -24,7 +24,7 @@ static NAME: &'static str = "pwd"; static VERSION: &'static str = "1.0.0"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ getopts::optflag("", "help", "display this help and exit"), diff --git a/rm/rm.rs b/rm/rm.rs index b8c8cef21..8148637d2 100644 --- a/rm/rm.rs +++ b/rm/rm.rs @@ -30,7 +30,7 @@ enum InteractiveMode { static NAME: &'static str = "rm"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); // TODO: make getopts support -R in addition to -r diff --git a/rmdir/rmdir.rs b/rmdir/rmdir.rs index 9ddd36424..136638bf5 100644 --- a/rmdir/rmdir.rs +++ b/rmdir/rmdir.rs @@ -23,7 +23,7 @@ mod util; static NAME: &'static str = "rmdir"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ diff --git a/seq/seq.rs b/seq/seq.rs index ca67e21e7..4a05cfdb8 100644 --- a/seq/seq.rs +++ b/seq/seq.rs @@ -34,7 +34,7 @@ fn escape_sequences(s: &str) -> String { } fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let opts = ~[ getopts::optopt("s", "separator", "Separator character (defaults to \\n)", ""), getopts::optopt("t", "terminator", "Terminator character (defaults to separator)", ""), diff --git a/sleep/sleep.rs b/sleep/sleep.rs index 1feb2fa9f..af4472e80 100644 --- a/sleep/sleep.rs +++ b/sleep/sleep.rs @@ -24,7 +24,7 @@ mod util; static NAME: &'static str = "sleep"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ diff --git a/tac/tac.rs b/tac/tac.rs index ef783fb40..adc22e35f 100644 --- a/tac/tac.rs +++ b/tac/tac.rs @@ -24,7 +24,7 @@ static NAME: &'static str = "tac"; static VERSION: &'static str = "1.0.0"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ diff --git a/tr/tr.rs b/tr/tr.rs index d0b6cfc88..283c44ae1 100644 --- a/tr/tr.rs +++ b/tr/tr.rs @@ -147,7 +147,7 @@ fn usage(opts: &[OptGroup]) { } pub fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let opts = [ getopts::optflag("c", "complement", "use the complement of SET1"), getopts::optflag("C", "", "same as -c"), diff --git a/truncate/truncate.rs b/truncate/truncate.rs index 9472283cd..348c83dca 100644 --- a/truncate/truncate.rs +++ b/truncate/truncate.rs @@ -47,7 +47,7 @@ enum TruncateMode { static NAME: &'static str = "truncate"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ diff --git a/tty/tty.rs b/tty/tty.rs index 6cde0c8db..dccb5ba98 100644 --- a/tty/tty.rs +++ b/tty/tty.rs @@ -35,7 +35,7 @@ extern { static NAME: &'static str = "tty"; fn main () { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let options = [ optflag("s", "silent", "print nothing, only return an exit status") diff --git a/uname/uname.rs b/uname/uname.rs index c334381af..df162239b 100644 --- a/uname/uname.rs +++ b/uname/uname.rs @@ -52,7 +52,7 @@ unsafe fn getuname() -> utsrust { static NAME: &'static str = "uname"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).as_slice(); let opts = ~[ getopts::optflag("h", "help", "display this help and exit"), diff --git a/unlink/unlink.rs b/unlink/unlink.rs index 042f475be..aa53a0efb 100644 --- a/unlink/unlink.rs +++ b/unlink/unlink.rs @@ -27,7 +27,7 @@ mod util; static NAME: &'static str = "unlink"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ getopts::optflag("h", "help", "display this help and exit"), diff --git a/uptime/uptime.rs b/uptime/uptime.rs index 8cb097f31..9b1b4e7f5 100644 --- a/uptime/uptime.rs +++ b/uptime/uptime.rs @@ -48,7 +48,7 @@ extern { } fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ getopts::optflag("v", "version", "output version information and exit"), diff --git a/users/users.rs b/users/users.rs index ea9229072..8050106e0 100644 --- a/users/users.rs +++ b/users/users.rs @@ -48,7 +48,7 @@ extern { static NAME: &'static str = "users"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).as_slice(); let opts = ~[ getopts::optflag("h", "help", "display this help and exit"), diff --git a/wc/wc.rs b/wc/wc.rs index caf7e8fde..f5f4b9c86 100644 --- a/wc/wc.rs +++ b/wc/wc.rs @@ -34,7 +34,7 @@ struct Result { static NAME: &'static str = "wc"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ getopts::optflag("c", "bytes", "print the byte counts"), diff --git a/whoami/whoami.rs b/whoami/whoami.rs index c553b59d9..75fd62107 100644 --- a/whoami/whoami.rs +++ b/whoami/whoami.rs @@ -42,7 +42,7 @@ unsafe fn getusername() -> String { static NAME: &'static str = "whoami"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).as_slice(); let opts = ~[ getopts::optflag("h", "help", "display this help and exit"), diff --git a/yes/yes.rs b/yes/yes.rs index e6a217186..eedc24bdd 100644 --- a/yes/yes.rs +++ b/yes/yes.rs @@ -25,7 +25,7 @@ mod util; static NAME: &'static str = "yes"; fn main() { - let args: Vec = os::args().iter().map(|x| x.to_strbuf()).collect(); + let args = os::args(); let program = args.get(0).clone(); let opts = ~[ getopts::optflag("h", "help", "display this help and exit"),