summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-07-08 08:33:13 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-07-27 16:38:25 -0700
commitb3aa1a6d4ac88f68e036a05fdf19be63b522b65d (patch)
tree77f61dd9cef4e552d058de8da0b3463ff71f097b /src/libstd/io
parenta5c12f4e39d32af3c951b66bd2839bc0b5a1125b (diff)
downloadrust-b3aa1a6d4ac88f68e036a05fdf19be63b522b65d.tar.gz
rust-b3aa1a6d4ac88f68e036a05fdf19be63b522b65d.zip
std: Deprecate a number of unstable features
Many of these have long since reached their stage of being obsolete, so this
commit starts the removal process for all of them. The unstable features that
were deprecated are:

* cmp_partial
* fs_time
* hash_default
* int_slice
* iter_min_max
* iter_reset_fuse
* iter_to_vec
* map_in_place
* move_from
* owned_ascii_ext
* page_size
* read_and_zero
* scan_state
* slice_chars
* slice_position_elem
* subslice_offset
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/buffered.rs2
-rw-r--r--src/libstd/io/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index c25aa35ffbe..29d1fe19adf 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -747,7 +747,7 @@ impl<W: Write> LineWriter<W> {
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<W: Write> Write for LineWriter<W> {
     fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        match buf.rposition_elem(&b'\n') {
+        match buf.iter().rposition(|b| *b == b'\n') {
             Some(i) => {
                 let n = try!(self.inner.write(&buf[..i + 1]));
                 if n != i + 1 { return Ok(n) }
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index fbdfdeaaef4..ffdd75b0e6e 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -1105,7 +1105,7 @@ fn read_until<R: BufRead + ?Sized>(r: &mut R, delim: u8, buf: &mut Vec<u8>)
                 Err(ref e) if e.kind() == ErrorKind::Interrupted => continue,
                 Err(e) => return Err(e)
             };
-            match available.position_elem(&delim) {
+            match available.iter().position(|x| *x == delim) {
                 Some(i) => {
                     buf.push_all(&available[..i + 1]);
                     (true, i + 1)