diff --git a/src/common/time.rs b/src/common/parse_time.rs similarity index 100% rename from src/common/time.rs rename to src/common/parse_time.rs diff --git a/src/sleep/sleep.rs b/src/sleep/sleep.rs index d75ac59fe..70abc233e 100644 --- a/src/sleep/sleep.rs +++ b/src/sleep/sleep.rs @@ -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) { 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), }); diff --git a/src/timeout/timeout.rs b/src/timeout/timeout.rs index e1dc2798c..7c4f7f44e 100644 --- a/src/timeout/timeout.rs +++ b/src/timeout/timeout.rs @@ -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);