about summary refs log tree commit diff
path: root/src/libstd/sys/common/mod.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-09 17:42:22 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-14 10:14:11 -0700
commitbf4e77d4b543632ca4df8fdd7092850dffc3954b (patch)
treec4b56d2a5974e1b3bf4bfc8b7ca1a62d64c2c341 /src/libstd/sys/common/mod.rs
parentdabf0c6371d3b193664f58746fa27c1835a010f3 (diff)
downloadrust-bf4e77d4b543632ca4df8fdd7092850dffc3954b.tar.gz
rust-bf4e77d4b543632ca4df8fdd7092850dffc3954b.zip
std: Remove old_io/old_path/rand modules
This commit entirely removes the old I/O, path, and rand modules. All
functionality has been deprecated and unstable for quite some time now!
Diffstat (limited to 'src/libstd/sys/common/mod.rs')
-rw-r--r--src/libstd/sys/common/mod.rs91
1 files changed, 0 insertions, 91 deletions
diff --git a/src/libstd/sys/common/mod.rs b/src/libstd/sys/common/mod.rs
index 8a01eace889..95294b813ea 100644
--- a/src/libstd/sys/common/mod.rs
+++ b/src/libstd/sys/common/mod.rs
@@ -10,24 +10,11 @@
 
 #![allow(missing_docs)]
 
-use old_io::{self, IoError, IoResult};
 use prelude::v1::*;
-use sys::{last_error, retry};
-use ffi::CString;
-#[allow(deprecated)] // Int
-use num::Int;
-
-#[allow(deprecated)]
-use old_path::BytesContainer;
-
-use collections;
-
-#[macro_use] pub mod helper_thread;
 
 pub mod backtrace;
 pub mod condvar;
 pub mod mutex;
-pub mod net;
 pub mod net2;
 pub mod poison;
 pub mod remutex;
@@ -40,72 +27,6 @@ pub mod wtf8;
 
 // common error constructors
 
-#[allow(deprecated)]
-pub fn eof() -> IoError {
-    IoError {
-        kind: old_io::EndOfFile,
-        desc: "end of file",
-        detail: None,
-    }
-}
-
-#[allow(deprecated)]
-pub fn timeout(desc: &'static str) -> IoError {
-    IoError {
-        kind: old_io::TimedOut,
-        desc: desc,
-        detail: None,
-    }
-}
-
-#[allow(deprecated)]
-pub fn short_write(n: usize, desc: &'static str) -> IoError {
-    IoError {
-        kind: if n == 0 { old_io::TimedOut } else { old_io::ShortWrite(n) },
-        desc: desc,
-        detail: None,
-    }
-}
-
-#[allow(deprecated)]
-pub fn unimpl() -> IoError {
-    IoError {
-        kind: old_io::IoUnavailable,
-        desc: "operations not yet supported",
-        detail: None,
-    }
-}
-
-// unix has nonzero values as errors
-#[allow(deprecated)]
-pub fn mkerr_libc<T: Int>(ret: T) -> IoResult<()> {
-    if ret != Int::zero() {
-        Err(last_error())
-    } else {
-        Ok(())
-    }
-}
-
-pub fn keep_going<F>(data: &[u8], mut f: F) -> i64 where
-    F: FnMut(*const u8, usize) -> i64,
-{
-    let origamt = data.len();
-    let mut data = data.as_ptr();
-    let mut amt = origamt;
-    while amt > 0 {
-        let ret = retry(|| f(data, amt));
-        if ret == 0 {
-            break
-        } else if ret != -1 {
-            amt -= ret as usize;
-            data = unsafe { data.offset(ret as isize) };
-        } else {
-            return ret;
-        }
-    }
-    return (origamt - amt) as i64;
-}
-
 /// A trait for viewing representations from std types
 #[doc(hidden)]
 pub trait AsInner<Inner: ?Sized> {
@@ -129,15 +50,3 @@ pub trait IntoInner<Inner> {
 pub trait FromInner<Inner> {
     fn from_inner(inner: Inner) -> Self;
 }
-
-#[doc(hidden)]
-#[allow(deprecated)]
-pub trait ProcessConfig<K: BytesContainer, V: BytesContainer> {
-    fn program(&self) -> &CString;
-    fn args(&self) -> &[CString];
-    fn env(&self) -> Option<&collections::HashMap<K, V>>;
-    fn cwd(&self) -> Option<&CString>;
-    fn uid(&self) -> Option<usize>;
-    fn gid(&self) -> Option<usize>;
-    fn detach(&self) -> bool;
-}