diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 2 | ||||
| -rw-r--r-- | src/libstd/old_io/test.rs | 8 | ||||
| -rw-r--r-- | src/libstd/rand/os.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/windows/fs.rs | 7 | ||||
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 1 |
5 files changed, 5 insertions, 14 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 3322b2c52bf..42ea50bff77 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -10,7 +10,7 @@ #![unstable(feature = "std_misc")] -use convert::Into; +use convert::{Into, From}; use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering}; use error::Error; use fmt; diff --git a/src/libstd/old_io/test.rs b/src/libstd/old_io/test.rs index 8c46e2c06b8..312e1c814dc 100644 --- a/src/libstd/old_io/test.rs +++ b/src/libstd/old_io/test.rs @@ -141,7 +141,7 @@ mod darwin_fd_limit { // sysctl value, and bump the soft resource limit for maxfiles up to the sysctl value. use ptr::null_mut; use mem::size_of_val; - use os::last_os_error; + use io; // Fetch the kern.maxfilesperproc value let mut mib: [libc::c_int; 2] = [CTL_KERN, KERN_MAXFILESPERPROC]; @@ -149,14 +149,14 @@ mod darwin_fd_limit { let mut size: libc::size_t = size_of_val(&maxfiles) as libc::size_t; if sysctl(&mut mib[0], 2, &mut maxfiles as *mut libc::c_int as *mut libc::c_void, &mut size, null_mut(), 0) != 0 { - let err = last_os_error(); + let err = io::Error::last_os_error(); panic!("raise_fd_limit: error calling sysctl: {}", err); } // Fetch the current resource limits let mut rlim = rlimit{rlim_cur: 0, rlim_max: 0}; if getrlimit(RLIMIT_NOFILE, &mut rlim) != 0 { - let err = last_os_error(); + let err = io::Error::last_os_error(); panic!("raise_fd_limit: error calling getrlimit: {}", err); } @@ -165,7 +165,7 @@ mod darwin_fd_limit { // Set our newly-increased resource limit if setrlimit(RLIMIT_NOFILE, &rlim) != 0 { - let err = last_os_error(); + let err = io::Error::last_os_error(); panic!("raise_fd_limit: error calling setrlimit: {}", err); } } diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs index 0a619ff8cd0..7aba40dc6be 100644 --- a/src/libstd/rand/os.rs +++ b/src/libstd/rand/os.rs @@ -254,7 +254,6 @@ mod imp { use io; use mem; use old_io::{IoResult, IoError}; - use os; use rand::Rng; use libc::types::os::arch::extra::{LONG_PTR}; use libc::{DWORD, BYTE, LPCSTR, BOOL}; diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs index 3330130c770..f534a33d8cc 100644 --- a/src/libstd/sys/windows/fs.rs +++ b/src/libstd/sys/windows/fs.rs @@ -135,13 +135,6 @@ impl FileDesc { _ => Err(super::last_error()), } } - - /// Extract the actual filedescriptor without closing it. - pub fn unwrap(self) -> fd_t { - let fd = self.fd; - unsafe { mem::forget(self) }; - fd - } } impl Drop for FileDesc { diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index 2065df4fbe3..414083bc41f 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -24,7 +24,6 @@ use old_io::process::{ProcessExit, ExitStatus}; use old_io::{IoResult, IoError}; use old_io; use fs::PathExt; -use os; use old_path::{BytesContainer, GenericPath}; use ptr; use str; |
