diff options
| author | Brian Anderson <banderson@mozilla.com> | 2016-09-30 22:11:46 +0000 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2016-11-01 17:08:24 +0000 |
| commit | 219c018894b31fec7059ca89bb1ab0606068aeaf (patch) | |
| tree | b18b2913d5b8aca124d2306e1790c5ab46a2252d /src/libstd/sys/windows | |
| parent | 6d54cd4b2cd864fbd6f2f8d036903f88b6ea79b4 (diff) | |
| download | rust-219c018894b31fec7059ca89bb1ab0606068aeaf.tar.gz rust-219c018894b31fec7059ca89bb1ab0606068aeaf.zip | |
std: Move platform-specific code out of libstd/lib.rs
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 9cd6e6ca176..0610a0245ea 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -179,7 +179,7 @@ pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] { } } -trait IsZero { +pub trait IsZero { fn is_zero(&self) -> bool; } @@ -193,7 +193,7 @@ macro_rules! impl_is_zero { impl_is_zero! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize } -fn cvt<I: IsZero>(i: I) -> io::Result<I> { +pub fn cvt<I: IsZero>(i: I) -> io::Result<I> { if i.is_zero() { Err(io::Error::last_os_error()) } else { @@ -201,7 +201,7 @@ fn cvt<I: IsZero>(i: I) -> io::Result<I> { } } -fn dur2timeout(dur: Duration) -> c::DWORD { +pub fn dur2timeout(dur: Duration) -> c::DWORD { // Note that a duration is a (u64, u32) (seconds, nanoseconds) pair, and the // timeouts in windows APIs are typically u32 milliseconds. To translate, we // have two pieces to take care of: |
