Remove the unnecessary conversion of os::args() ret val

Missed these in 46b9d6d78e
This commit is contained in:
Michael Gehring 2014-05-25 11:55:28 +02:00
parent 0d76dda994
commit a70f858f12
21 changed files with 21 additions and 21 deletions

View file

@ -50,7 +50,7 @@ extern {
}
fn main() {
let args: Vec<String> = os::args().iter().map(|x| x.to_strbuf()).collect();
let args = os::args();
let opts = [
optflag("", "help", "display this help and exit"),

View file

@ -28,7 +28,7 @@ static NAME: &'static str = "md5sum";
static VERSION: &'static str = "1.0.0";
fn main() {
let args: Vec<String> = os::args().iter().map(|x| x.to_strbuf()).collect();
let args = os::args();
let program = args.get(0).clone();

View file

@ -29,7 +29,7 @@ static VERSION: &'static str = "1.0.0";
* Handles option parsing
*/
fn main() {
let args: Vec<String> = os::args().iter().map(|x| x.to_strbuf()).collect();
let args = os::args();
let opts = ~[
// Linux-specific options, not implemented

View file

@ -24,7 +24,7 @@ static NAME: &'static str = "paste";
static VERSION: &'static str = "1.0.0";
fn main() {
let args: Vec<String> = os::args().iter().map(|x| x.to_strbuf()).collect();
let args = os::args();
let program = args.get(0).clone();
let opts = ~[

View file

@ -25,7 +25,7 @@ mod util;
static NAME: &'static str = "printenv";
fn main() {
let args: Vec<String> = 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"),

View file

@ -24,7 +24,7 @@ static NAME: &'static str = "pwd";
static VERSION: &'static str = "1.0.0";
fn main() {
let args: Vec<String> = 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"),

View file

@ -30,7 +30,7 @@ enum InteractiveMode {
static NAME: &'static str = "rm";
fn main() {
let args: Vec<String> = 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

View file

@ -23,7 +23,7 @@ mod util;
static NAME: &'static str = "rmdir";
fn main() {
let args: Vec<String> = os::args().iter().map(|x| x.to_strbuf()).collect();
let args = os::args();
let program = args.get(0).clone();
let opts = ~[

View file

@ -34,7 +34,7 @@ fn escape_sequences(s: &str) -> String {
}
fn main() {
let args: Vec<String> = 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)", ""),

View file

@ -24,7 +24,7 @@ mod util;
static NAME: &'static str = "sleep";
fn main() {
let args: Vec<String> = os::args().iter().map(|x| x.to_strbuf()).collect();
let args = os::args();
let program = args.get(0).clone();
let opts = ~[

View file

@ -24,7 +24,7 @@ static NAME: &'static str = "tac";
static VERSION: &'static str = "1.0.0";
fn main() {
let args: Vec<String> = os::args().iter().map(|x| x.to_strbuf()).collect();
let args = os::args();
let program = args.get(0).clone();
let opts = ~[

View file

@ -147,7 +147,7 @@ fn usage(opts: &[OptGroup]) {
}
pub fn main() {
let args: Vec<String> = 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"),

View file

@ -47,7 +47,7 @@ enum TruncateMode {
static NAME: &'static str = "truncate";
fn main() {
let args: Vec<String> = os::args().iter().map(|x| x.to_strbuf()).collect();
let args = os::args();
let program = args.get(0).clone();
let opts = ~[

View file

@ -35,7 +35,7 @@ extern {
static NAME: &'static str = "tty";
fn main () {
let args: Vec<String> = 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")

View file

@ -52,7 +52,7 @@ unsafe fn getuname() -> utsrust {
static NAME: &'static str = "uname";
fn main() {
let args: Vec<String> = 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"),

View file

@ -27,7 +27,7 @@ mod util;
static NAME: &'static str = "unlink";
fn main() {
let args: Vec<String> = 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"),

View file

@ -48,7 +48,7 @@ extern {
}
fn main() {
let args: Vec<String> = 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"),

View file

@ -48,7 +48,7 @@ extern {
static NAME: &'static str = "users";
fn main() {
let args: Vec<String> = 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"),

View file

@ -34,7 +34,7 @@ struct Result {
static NAME: &'static str = "wc";
fn main() {
let args: Vec<String> = 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"),

View file

@ -42,7 +42,7 @@ unsafe fn getusername() -> String {
static NAME: &'static str = "whoami";
fn main() {
let args: Vec<String> = 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"),

View file

@ -25,7 +25,7 @@ mod util;
static NAME: &'static str = "yes";
fn main() {
let args: Vec<String> = 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"),