about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unsupported/io.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/pal/unsupported/io.rs')
-rw-r--r--library/std/src/sys/pal/unsupported/io.rs56
1 files changed, 0 insertions, 56 deletions
diff --git a/library/std/src/sys/pal/unsupported/io.rs b/library/std/src/sys/pal/unsupported/io.rs
deleted file mode 100644
index 604735d32d5..00000000000
--- a/library/std/src/sys/pal/unsupported/io.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-use crate::mem;
-
-#[derive(Copy, Clone)]
-pub struct IoSlice<'a>(&'a [u8]);
-
-impl<'a> IoSlice<'a> {
-    #[inline]
-    pub fn new(buf: &'a [u8]) -> IoSlice<'a> {
-        IoSlice(buf)
-    }
-
-    #[inline]
-    pub fn advance(&mut self, n: usize) {
-        self.0 = &self.0[n..]
-    }
-
-    #[inline]
-    pub const fn as_slice(&self) -> &'a [u8] {
-        self.0
-    }
-}
-
-pub struct IoSliceMut<'a>(&'a mut [u8]);
-
-impl<'a> IoSliceMut<'a> {
-    #[inline]
-    pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> {
-        IoSliceMut(buf)
-    }
-
-    #[inline]
-    pub fn advance(&mut self, n: usize) {
-        let slice = mem::take(&mut self.0);
-        let (_, remaining) = slice.split_at_mut(n);
-        self.0 = remaining;
-    }
-
-    #[inline]
-    pub fn as_slice(&self) -> &[u8] {
-        self.0
-    }
-
-    #[inline]
-    pub const fn into_slice(self) -> &'a mut [u8] {
-        self.0
-    }
-
-    #[inline]
-    pub fn as_mut_slice(&mut self) -> &mut [u8] {
-        self.0
-    }
-}
-
-pub fn is_terminal<T>(_: &T) -> bool {
-    false
-}