]> git.lizzy.rs Git - rust.git/commitdiff
std: Deprecate the io::BufStream type
authorAlex Crichton <alex@alexcrichton.com>
Thu, 11 Jun 2015 01:52:57 +0000 (18:52 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 17 Jun 2015 16:07:16 +0000 (09:07 -0700)
Questions about the utility of this type has caused it to move to crates.io in
the `bufstream` crate, so this type can be deprecated.

src/libstd/io/buffered.rs

index c355be9bc78d27786634e051e817d5a11d896635..95363870cd08fc1346c9b7e3c9bc2b5a53fe8054 100644 (file)
@@ -454,6 +454,8 @@ fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
 #[unstable(feature = "buf_stream",
            reason = "unsure about semantics of buffering two directions, \
                      leading to issues like #17136")]
+#[deprecated(since = "1.2.0",
+             reason = "use the crates.io `bufstream` crate instead")]
 pub struct BufStream<S: Write> {
     inner: BufReader<InternalBufWriter<S>>
 }
@@ -461,6 +463,8 @@ pub struct BufStream<S: Write> {
 #[unstable(feature = "buf_stream",
            reason = "unsure about semantics of buffering two directions, \
                      leading to issues like #17136")]
+#[deprecated(since = "1.2.0",
+             reason = "use the crates.io `bufstream` crate instead")]
 impl<S: Read + Write> BufStream<S> {
     /// Creates a new buffered stream with explicitly listed capacities for the
     /// reader/writer buffer.