about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-08-11 17:27:05 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-08-12 14:55:17 -0700
commit8d90d3f36871a00023cc1f313f91e351c287ca15 (patch)
tree2d9b616a2468117aa3afe1f6b1f910ff3116776b /src/libstd/sys/windows
parentd07d465cf60033e35eba16b9e431471d54c712f4 (diff)
downloadrust-8d90d3f36871a00023cc1f313f91e351c287ca15.tar.gz
rust-8d90d3f36871a00023cc1f313f91e351c287ca15.zip
Remove all unstable deprecated functionality
This commit removes all unstable and deprecated functions in the standard
library. A release was recently cut (1.3) which makes this a good time for some
spring cleaning of the deprecated functions.
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/fs.rs13
-rw-r--r--src/libstd/sys/windows/mod.rs10
-rw-r--r--src/libstd/sys/windows/net.rs1
-rw-r--r--src/libstd/sys/windows/os.rs9
4 files changed, 0 insertions, 33 deletions
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index b8c3f1e7b35..d413d536cc8 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -571,19 +571,6 @@ pub fn set_perm(p: &Path, perm: FilePermissions) -> io::Result<()> {
     }
 }
 
-pub fn utimes(p: &Path, atime: u64, mtime: u64) -> io::Result<()> {
-    let atime = super::ms_to_filetime(atime);
-    let mtime = super::ms_to_filetime(mtime);
-
-    let mut o = OpenOptions::new();
-    o.write(true);
-    let f = try!(File::open(p, &o));
-    try!(cvt(unsafe {
-        c::SetFileTime(f.handle.raw(), 0 as *const _, &atime, &mtime)
-    }));
-    Ok(())
-}
-
 fn get_path(f: &File) -> io::Result<PathBuf> {
     super::fill_utf16_buf(|buf, sz| unsafe {
         c::GetFinalPathNameByHandleW(f.handle.raw(), buf, sz,
diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs
index b38945d8916..732e2e65864 100644
--- a/src/libstd/sys/windows/mod.rs
+++ b/src/libstd/sys/windows/mod.rs
@@ -174,13 +174,3 @@ fn dur2timeout(dur: Duration) -> libc::DWORD {
         }
     }).unwrap_or(libc::INFINITE)
 }
-
-fn ms_to_filetime(ms: u64) -> libc::FILETIME {
-    // A FILETIME is a count of 100 nanosecond intervals, so we multiply by
-    // 10000 b/c there are 10000 intervals in 1 ms
-    let ms = ms * 10000;
-    libc::FILETIME {
-        dwLowDateTime: ms as u32,
-        dwHighDateTime: (ms >> 32) as u32,
-    }
-}
diff --git a/src/libstd/sys/windows/net.rs b/src/libstd/sys/windows/net.rs
index 02c5bc1f0ab..57e84b0c46c 100644
--- a/src/libstd/sys/windows/net.rs
+++ b/src/libstd/sys/windows/net.rs
@@ -67,7 +67,6 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> {
 }
 
 /// Provides the functionality of `cvt` for a closure.
-#[allow(deprecated)]
 pub fn cvt_r<T, F>(mut f: F) -> io::Result<T>
     where F: FnMut() -> T, T: One + Neg<Output=T> + PartialEq
 {
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index 694d873d0d2..3e640ceaddd 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -21,7 +21,6 @@ use fmt;
 use io;
 use libc::types::os::arch::extra::LPWCH;
 use libc::{self, c_int, c_void};
-use mem;
 use ops::Range;
 use os::windows::ffi::EncodeWide;
 use path::{self, PathBuf};
@@ -334,14 +333,6 @@ pub fn args() -> Args {
     }
 }
 
-pub fn page_size() -> usize {
-    unsafe {
-        let mut info = mem::zeroed();
-        libc::GetSystemInfo(&mut info);
-        return info.dwPageSize as usize;
-    }
-}
-
 pub fn temp_dir() -> PathBuf {
     super::fill_utf16_buf(|buf, sz| unsafe {
         c::GetTempPathW(sz, buf)