Rename time.rs to parse_time.rs

Conflicts with crate time.
This commit is contained in:
Remi Rampin 2015-06-30 16:17:02 -04:00
parent 28302555b8
commit 13f5994e15
3 changed files with 7 additions and 7 deletions

View file

@ -20,8 +20,8 @@ use std::u32::MAX as U32_MAX;
#[macro_use]
mod util;
#[path = "../common/time.rs"]
mod time;
#[path = "../common/parse_time.rs"]
mod parse_time;
static NAME: &'static str = "sleep";
static VERSION: &'static str = "1.0.0";
@ -67,7 +67,7 @@ specified by the sum of their values.", NAME, VERSION);
fn sleep(args: Vec<String>) {
let sleep_time = args.iter().fold(0.0, |result, arg|
match time::from_str(&arg[..]) {
match parse_time::from_str(&arg[..]) {
Ok(m) => m + result,
Err(f) => crash!(1, "{}", f),
});

View file

@ -22,8 +22,8 @@ use std::os::unix::process::ExitStatusExt;
#[macro_use]
mod util;
#[path = "../common/time.rs"]
mod time;
#[path = "../common/parse_time.rs"]
mod parse_time;
#[path = "../common/signals.rs"]
mod signals;
@ -70,7 +70,7 @@ Usage:
let status = matches.opt_present("preserve-status");
let foreground = matches.opt_present("foreground");
let kill_after = match matches.opt_str("kill-after") {
Some(tstr) => match time::from_str(&tstr) {
Some(tstr) => match parse_time::from_str(&tstr) {
Ok(time) => time,
Err(f) => {
show_error!("{}", f);
@ -89,7 +89,7 @@ Usage:
},
None => signals::signal_by_name_or_value("TERM").unwrap()
};
let duration = match time::from_str(&matches.free[0]) {
let duration = match parse_time::from_str(&matches.free[0]) {
Ok(time) => time,
Err(f) => {
show_error!("{}", f);