diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-26 16:18:29 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-26 16:40:36 -0700 |
| commit | 6370f2978e485fd46bcb64f51a1c003395acfedc (patch) | |
| tree | 32a1d0ad913d1180e71916b70044122fc7503bf3 /src/libstd/sys/windows/os.rs | |
| parent | 557d4346a26266d2eb13f6b0adf106b8873b0da1 (diff) | |
| download | rust-6370f2978e485fd46bcb64f51a1c003395acfedc.tar.gz rust-6370f2978e485fd46bcb64f51a1c003395acfedc.zip | |
std: Stabilize parts of std::os::platform::io
This commit stabilizes the platform-specific `io` modules, specifically around
the traits having to do with the raw representation of each object on each
platform.
Specifically, the following material was stabilized:
* `AsRaw{Fd,Socket,Handle}`
* `RawFd` (renamed from `Fd`)
* `RawHandle` (renamed from `Handle`)
* `RawSocket` (renamed from `Socket`)
* `AsRaw{Fd,Socket,Handle}` implementations
* `std::os::{unix, windows}::io`
The following material was added as `#[unstable]`:
* `FromRaw{Fd,Socket,Handle}`
* Implementations for various primitives
There are a number of future improvements that are possible to make to this
module, but this should cover a good bit of functionality desired from these
modules for now. Some specific future additions may include:
* `IntoRawXXX` traits to consume the raw representation and cancel the
auto-destructor.
* `Fd`, `Socket`, and `Handle` abstractions that behave like Rust objects and
have nice methods for various syscalls.
At this time though, these are considered backwards-compatible extensions and
will not be stabilized at this time.
This commit is a breaking change due to the addition of `Raw` in from of the
type aliases in each of the platform-specific modules.
[breaking-change]
Diffstat (limited to 'src/libstd/sys/windows/os.rs')
| -rw-r--r-- | src/libstd/sys/windows/os.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index 167db1e8ac2..5cd90b0902b 100644 --- a/src/libstd/sys/windows/os.rs +++ b/src/libstd/sys/windows/os.rs @@ -31,7 +31,7 @@ use ptr; use slice; use sys::c; use sys::fs::FileDesc; -use sys::handle::Handle as RawHandle; +use sys::handle::Handle; use libc::funcs::extra::kernel32::{ GetEnvironmentStringsW, @@ -369,7 +369,7 @@ pub fn home_dir() -> Option<PathBuf> { if c::OpenProcessToken(me, c::TOKEN_READ, &mut token) == 0 { return None } - let _handle = RawHandle::new(token); + let _handle = Handle::new(token); super::fill_utf16_buf_new(|buf, mut sz| { match c::GetUserProfileDirectoryW(token, buf, &mut sz) { 0 if libc::GetLastError() != 0 => 0, |
