From de21ff4c2f382b6af66301fa118b8021a66282b7 Mon Sep 17 00:00:00 2001 From: Alan Andrade Date: Sun, 23 Feb 2014 14:17:48 -0800 Subject: [PATCH] Move util.rs to common --- base64/base64.rs | 2 +- basename/basename.rs | 2 +- util.rs => common/util.rs | 0 du/du.rs | 2 +- echo/echo.rs | 2 +- mkdir/mkdir.rs | 2 +- printenv/printenv.rs | 2 +- pwd/pwd.rs | 2 +- rm/rm.rs | 2 +- rmdir/rmdir.rs | 2 +- seq/seq.rs | 2 +- sleep/sleep.rs | 2 +- truncate/truncate.rs | 2 +- tty/tty.rs | 2 +- users/users.rs | 2 +- wc/wc.rs | 2 +- whoami/whoami.rs | 2 +- yes/yes.rs | 2 +- 18 files changed, 17 insertions(+), 17 deletions(-) rename util.rs => common/util.rs (100%) diff --git a/base64/base64.rs b/base64/base64.rs index ca30682c1..a05c9c520 100644 --- a/base64/base64.rs +++ b/base64/base64.rs @@ -28,7 +28,7 @@ use getopts::{ use serialize::base64; use serialize::base64::{FromBase64, ToBase64}; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "base64"; diff --git a/basename/basename.rs b/basename/basename.rs index 7ac29c5b5..d82bd2eb1 100644 --- a/basename/basename.rs +++ b/basename/basename.rs @@ -18,7 +18,7 @@ use std::os; use std::str; use std::str::StrSlice; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "basename"; diff --git a/util.rs b/common/util.rs similarity index 100% rename from util.rs rename to common/util.rs diff --git a/du/du.rs b/du/du.rs index 2397385aa..903a87fb4 100644 --- a/du/du.rs +++ b/du/du.rs @@ -23,7 +23,7 @@ use std::path::Path; use time::Timespec; use sync::{Arc, Future}; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "du"; diff --git a/echo/echo.rs b/echo/echo.rs index 0780b8cac..fd6bfc8d9 100644 --- a/echo/echo.rs +++ b/echo/echo.rs @@ -17,7 +17,7 @@ use std::os; use std::io::{print, println}; use std::uint; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "echo"; diff --git a/mkdir/mkdir.rs b/mkdir/mkdir.rs index 4cf6c78cc..80ade2501 100644 --- a/mkdir/mkdir.rs +++ b/mkdir/mkdir.rs @@ -18,7 +18,7 @@ use std::os; use std::io::fs; use std::num::strconv; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "mkdir"; diff --git a/printenv/printenv.rs b/printenv/printenv.rs index bee1f8d0f..3b9a648e5 100644 --- a/printenv/printenv.rs +++ b/printenv/printenv.rs @@ -19,7 +19,7 @@ extern crate getopts; use std::os; use std::io::print; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "printenv"; diff --git a/pwd/pwd.rs b/pwd/pwd.rs index be638c817..aa282abdc 100644 --- a/pwd/pwd.rs +++ b/pwd/pwd.rs @@ -17,7 +17,7 @@ extern crate getopts; use std::os; use std::io::print; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "pwd"; diff --git a/rm/rm.rs b/rm/rm.rs index 00809d3b3..9cec82474 100644 --- a/rm/rm.rs +++ b/rm/rm.rs @@ -17,7 +17,7 @@ extern crate getopts; use std::os; use std::io::{print, stdin, stdio, fs, BufferedReader}; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; #[deriving(Eq)] diff --git a/rmdir/rmdir.rs b/rmdir/rmdir.rs index 6b344325e..9de1e5327 100644 --- a/rmdir/rmdir.rs +++ b/rmdir/rmdir.rs @@ -17,7 +17,7 @@ extern crate getopts; use std::os; use std::io::{print, fs}; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "rmdir"; diff --git a/seq/seq.rs b/seq/seq.rs index baee8d492..6d8358b12 100644 --- a/seq/seq.rs +++ b/seq/seq.rs @@ -11,7 +11,7 @@ extern crate getopts; use std::os; use std::cmp::max; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "seq"; diff --git a/sleep/sleep.rs b/sleep/sleep.rs index 5475b4b01..bd7138449 100644 --- a/sleep/sleep.rs +++ b/sleep/sleep.rs @@ -19,7 +19,7 @@ use std::cast; use std::os; use std::io::{print, timer}; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "sleep"; diff --git a/truncate/truncate.rs b/truncate/truncate.rs index 092efc5b6..15f86c355 100644 --- a/truncate/truncate.rs +++ b/truncate/truncate.rs @@ -18,7 +18,7 @@ use std::io::{File, Open, ReadWrite, fs}; use std::os; use std::u64; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; macro_rules! get_file_size( diff --git a/tty/tty.rs b/tty/tty.rs index b416fecc4..773887a2b 100644 --- a/tty/tty.rs +++ b/tty/tty.rs @@ -24,7 +24,7 @@ use std::io::println; use std::io::stdio::stderr; use getopts::{optflag,getopts}; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; extern { diff --git a/users/users.rs b/users/users.rs index 5cf466ef9..04c228b47 100644 --- a/users/users.rs +++ b/users/users.rs @@ -27,7 +27,7 @@ use std::ptr; use std::str; use utmpx::*; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; #[cfg(target_os = "linux")] diff --git a/wc/wc.rs b/wc/wc.rs index 64122e5e5..ef49d6517 100644 --- a/wc/wc.rs +++ b/wc/wc.rs @@ -19,7 +19,7 @@ use std::str::from_utf8; use std::io::{print, stdin, File, BufferedReader}; use getopts::Matches; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; struct Result { diff --git a/whoami/whoami.rs b/whoami/whoami.rs index b6a466336..d632cf11c 100644 --- a/whoami/whoami.rs +++ b/whoami/whoami.rs @@ -23,7 +23,7 @@ use std::os; use std::str; use std::libc; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; struct c_passwd { diff --git a/yes/yes.rs b/yes/yes.rs index 8543f20f6..3e2d9fbcd 100644 --- a/yes/yes.rs +++ b/yes/yes.rs @@ -19,7 +19,7 @@ extern crate getopts; use std::os; use std::io::{print, println}; -#[path = "../util.rs"] +#[path = "../common/util.rs"] mod util; static NAME: &'static str = "yes";