From 786b39019b066d1fff28a6a8b5f46ca62197956b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Neder?= Date: Tue, 18 Mar 2014 09:19:25 -0300 Subject: [PATCH] Fix master by removing extra crate, and using max method for comparing floats --- basename/basename.rs | 1 - cat/cat.rs | 1 - dirname/dirname.rs | 1 - echo/echo.rs | 1 - head/head.rs | 1 - hostname/hostname.rs | 1 - logname/logname.rs | 1 - mkdir/mkdir.rs | 1 - printenv/printenv.rs | 1 - pwd/pwd.rs | 1 - rm/rm.rs | 1 - rmdir/rmdir.rs | 1 - seq/seq.rs | 4 +--- sleep/sleep.rs | 1 - tee/tee.rs | 1 - truncate/truncate.rs | 1 - tty/tty.rs | 1 - users/users.rs | 1 - wc/wc.rs | 1 - whoami/whoami.rs | 1 - yes/yes.rs | 1 - 21 files changed, 1 insertion(+), 23 deletions(-) diff --git a/basename/basename.rs b/basename/basename.rs index d82bd2eb1..fb1f12c6e 100644 --- a/basename/basename.rs +++ b/basename/basename.rs @@ -10,7 +10,6 @@ * file that was distributed with this source code. */ -extern crate extra; extern crate getopts; use std::io::{print, println}; diff --git a/cat/cat.rs b/cat/cat.rs index 929ae23ec..cd940fd4b 100644 --- a/cat/cat.rs +++ b/cat/cat.rs @@ -12,7 +12,6 @@ /* last synced with: cat (GNU coreutils) 8.13 */ -extern crate extra; extern crate getopts; use std::os; diff --git a/dirname/dirname.rs b/dirname/dirname.rs index 47af881fb..f475b23a4 100644 --- a/dirname/dirname.rs +++ b/dirname/dirname.rs @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ -extern crate extra; extern crate getopts; use std::os; diff --git a/echo/echo.rs b/echo/echo.rs index fd6bfc8d9..38a31a9b2 100644 --- a/echo/echo.rs +++ b/echo/echo.rs @@ -10,7 +10,6 @@ * file that was distributed with this source code. */ -extern crate extra; extern crate getopts; use std::os; diff --git a/head/head.rs b/head/head.rs index 8ed5212b5..b5ac881de 100644 --- a/head/head.rs +++ b/head/head.rs @@ -10,7 +10,6 @@ * Synced with: https://raw.github.com/avsm/src/master/usr.bin/head/head.c */ -extern crate extra; extern crate getopts; use std::os; diff --git a/hostname/hostname.rs b/hostname/hostname.rs index b0dae0a71..750059fd9 100644 --- a/hostname/hostname.rs +++ b/hostname/hostname.rs @@ -12,7 +12,6 @@ * https://www.opensource.apple.com/source/shell_cmds/shell_cmds-170/hostname/hostname.c?txt */ -extern crate extra; extern crate getopts; use std::{os,libc,vec,str}; diff --git a/logname/logname.rs b/logname/logname.rs index 975f242d8..cce4334f3 100644 --- a/logname/logname.rs +++ b/logname/logname.rs @@ -15,7 +15,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::io::{print, println}; diff --git a/mkdir/mkdir.rs b/mkdir/mkdir.rs index c1b9c4801..3f2547be9 100644 --- a/mkdir/mkdir.rs +++ b/mkdir/mkdir.rs @@ -11,7 +11,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::os; diff --git a/printenv/printenv.rs b/printenv/printenv.rs index 3b9a648e5..e87e899b9 100644 --- a/printenv/printenv.rs +++ b/printenv/printenv.rs @@ -13,7 +13,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::os; diff --git a/pwd/pwd.rs b/pwd/pwd.rs index aa282abdc..4e974f221 100644 --- a/pwd/pwd.rs +++ b/pwd/pwd.rs @@ -11,7 +11,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::os; diff --git a/rm/rm.rs b/rm/rm.rs index ec9b987ab..87dd840cc 100644 --- a/rm/rm.rs +++ b/rm/rm.rs @@ -11,7 +11,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::os; diff --git a/rmdir/rmdir.rs b/rmdir/rmdir.rs index 9de1e5327..76150e4c6 100644 --- a/rmdir/rmdir.rs +++ b/rmdir/rmdir.rs @@ -11,7 +11,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::os; diff --git a/seq/seq.rs b/seq/seq.rs index 6d8358b12..d033e9b92 100644 --- a/seq/seq.rs +++ b/seq/seq.rs @@ -5,11 +5,9 @@ // TODO: Make -w flag work with decimals // TODO: Support -f flag -extern crate extra; extern crate getopts; use std::os; -use std::cmp::max; #[path = "../common/util.rs"] mod util; @@ -99,7 +97,7 @@ fn done_printing(next: f32, step: f32, last: f32) -> bool { fn print_seq(first: f32, step: f32, last: f32, separator: ~str, terminator: ~str, pad: bool) { let mut i = first; - let maxlen = max(first, last).to_str().len(); + let maxlen = first.max(last).to_str().len(); while !done_printing(i, step, last) { let ilen = i.to_str().len(); if pad && ilen < maxlen { diff --git a/sleep/sleep.rs b/sleep/sleep.rs index 98b2c75be..61ade1e19 100644 --- a/sleep/sleep.rs +++ b/sleep/sleep.rs @@ -11,7 +11,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::num; diff --git a/tee/tee.rs b/tee/tee.rs index 86db68d2a..43cf53894 100644 --- a/tee/tee.rs +++ b/tee/tee.rs @@ -10,7 +10,6 @@ * file that was distributed with this source code. */ -extern crate extra; extern crate getopts; use std::io::{println, stdin, stdout, Append, File, Truncate, Write}; diff --git a/truncate/truncate.rs b/truncate/truncate.rs index 15f86c355..975510f8c 100644 --- a/truncate/truncate.rs +++ b/truncate/truncate.rs @@ -11,7 +11,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::io::{File, Open, ReadWrite, fs}; diff --git a/tty/tty.rs b/tty/tty.rs index 773887a2b..ce7683f16 100644 --- a/tty/tty.rs +++ b/tty/tty.rs @@ -16,7 +16,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::{libc,str,os}; diff --git a/users/users.rs b/users/users.rs index 04c228b47..7211f3307 100644 --- a/users/users.rs +++ b/users/users.rs @@ -16,7 +16,6 @@ #[feature(macro_rules, globs)]; -extern crate extra; extern crate getopts; use std::io::print; diff --git a/wc/wc.rs b/wc/wc.rs index ef49d6517..a5038bfae 100644 --- a/wc/wc.rs +++ b/wc/wc.rs @@ -11,7 +11,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::os; diff --git a/whoami/whoami.rs b/whoami/whoami.rs index 1da5634ce..ba0b8ba9a 100644 --- a/whoami/whoami.rs +++ b/whoami/whoami.rs @@ -15,7 +15,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::io::print; diff --git a/yes/yes.rs b/yes/yes.rs index 3e2d9fbcd..1391c625a 100644 --- a/yes/yes.rs +++ b/yes/yes.rs @@ -13,7 +13,6 @@ #[feature(macro_rules)]; -extern crate extra; extern crate getopts; use std::os;