fix(rustup): update io import, Writer::write

Make it build with the latest rust-nightly (2015-01-27)

Renamed io import to old_io.
Renamed Writer::write to Writer::write_all
This commit is contained in:
Christian Stefanescu
2015-01-28 19:52:18 +01:00
committed by Sean McArthur
parent 537d691d61
commit f606b6039d
18 changed files with 81 additions and 81 deletions

View File

@@ -1,10 +1,10 @@
//! A collection of traits abstracting over Listeners and Streams.
use std::any::{Any, TypeId};
use std::fmt;
use std::io::{IoResult, IoError, ConnectionAborted, InvalidInput, OtherIoError,
use std::old_io::{IoResult, IoError, ConnectionAborted, InvalidInput, OtherIoError,
Stream, Listener, Acceptor};
use std::io::net::ip::{SocketAddr, ToSocketAddr, Port};
use std::io::net::tcp::{TcpStream, TcpListener, TcpAcceptor};
use std::old_io::net::ip::{SocketAddr, ToSocketAddr, Port};
use std::old_io::net::tcp::{TcpStream, TcpListener, TcpAcceptor};
use std::mem;
use std::raw::{self, TraitObject};
use std::sync::Arc;
@@ -112,7 +112,7 @@ impl Reader for Box<NetworkStream + Send> {
impl Writer for Box<NetworkStream + Send> {
#[inline]
fn write(&mut self, msg: &[u8]) -> IoResult<()> { (**self).write(msg) }
fn write_all(&mut self, msg: &[u8]) -> IoResult<()> { (**self).write_all(msg) }
#[inline]
fn flush(&mut self) -> IoResult<()> { (**self).flush() }
@@ -125,7 +125,7 @@ impl<'a> Reader for &'a mut NetworkStream {
impl<'a> Writer for &'a mut NetworkStream {
#[inline]
fn write(&mut self, msg: &[u8]) -> IoResult<()> { (**self).write(msg) }
fn write_all(&mut self, msg: &[u8]) -> IoResult<()> { (**self).write_all(msg) }
#[inline]
fn flush(&mut self) -> IoResult<()> { (**self).flush() }
@@ -282,10 +282,10 @@ impl Reader for HttpStream {
impl Writer for HttpStream {
#[inline]
fn write(&mut self, msg: &[u8]) -> IoResult<()> {
fn write_all(&mut self, msg: &[u8]) -> IoResult<()> {
match *self {
HttpStream::Http(ref mut inner) => inner.write(msg),
HttpStream::Https(ref mut inner) => inner.write(msg)
HttpStream::Http(ref mut inner) => inner.write_all(msg),
HttpStream::Https(ref mut inner) => inner.write_all(msg)
}
}
#[inline]