From 52c0c92cd8dd02dd70369dd253b658948bf89e5e Mon Sep 17 00:00:00 2001 From: edef Date: Thu, 16 Apr 2015 05:49:34 -0400 Subject: [PATCH] move OS specifics into sys --- src/lib.rs | 2 ++ src/os.rs | 4 +--- src/sys/mod.rs | 5 +++++ src/{os => sys}/unix.rs | 0 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/sys/mod.rs rename src/{os => sys}/unix.rs (100%) diff --git a/src/lib.rs b/src/lib.rs index ae117ea..a3fd51f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,3 +26,5 @@ mod arch; #[cfg(feature = "os")] pub mod os; +#[cfg(feature = "os")] +mod sys; diff --git a/src/os.rs b/src/os.rs index b21572a..bdfa96f 100644 --- a/src/os.rs +++ b/src/os.rs @@ -2,9 +2,7 @@ extern crate std; use core::prelude::*; use self::std::io::Error as IoError; use stack; - -#[cfg(unix)] -#[path = "os/unix.rs"] mod sys; +use sys; pub struct StackSource; diff --git a/src/sys/mod.rs b/src/sys/mod.rs new file mode 100644 index 0000000..34f3dcb --- /dev/null +++ b/src/sys/mod.rs @@ -0,0 +1,5 @@ +pub use self::imp::*; + +#[cfg(unix)] +#[path = "unix.rs"] +mod imp; diff --git a/src/os/unix.rs b/src/sys/unix.rs similarity index 100% rename from src/os/unix.rs rename to src/sys/unix.rs