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:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							537d691d61
						
					
				
				
					commit
					f606b6039d
				
			| @@ -1,6 +1,6 @@ | ||||
| //! HTTP Server | ||||
| use std::io::{Listener, EndOfFile, BufferedReader, BufferedWriter}; | ||||
| use std::io::net::ip::{IpAddr, Port, SocketAddr}; | ||||
| use std::old_io::{Listener, EndOfFile, BufferedReader, BufferedWriter}; | ||||
| use std::old_io::net::ip::{IpAddr, Port, SocketAddr}; | ||||
| use std::os; | ||||
| use std::sync::{Arc, TaskPool}; | ||||
| use std::thread::{Builder, JoinGuard}; | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| //! | ||||
| //! These are requests that a `hyper::Server` receives, and include its method, | ||||
| //! target URI, headers, and message body. | ||||
| use std::io::IoResult; | ||||
| use std::io::net::ip::SocketAddr; | ||||
| use std::old_io::IoResult; | ||||
| use std::old_io::net::ip::SocketAddr; | ||||
|  | ||||
| use {HttpResult}; | ||||
| use version::{HttpVersion}; | ||||
| @@ -84,7 +84,7 @@ mod tests { | ||||
|     use mock::MockStream; | ||||
|     use super::Request; | ||||
|  | ||||
|     use std::io::net::ip::SocketAddr; | ||||
|     use std::old_io::net::ip::SocketAddr; | ||||
|  | ||||
|     fn sock(s: &str) -> SocketAddr { | ||||
|         s.parse().unwrap() | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
| //! | ||||
| //! These are responses sent by a `hyper::Server` to clients, after | ||||
| //! receiving a request. | ||||
| use std::io::IoResult; | ||||
| use std::old_io::IoResult; | ||||
|  | ||||
| use time::now_utc; | ||||
|  | ||||
| @@ -141,9 +141,9 @@ impl<'a> Response<'a, Streaming> { | ||||
| } | ||||
|  | ||||
| impl<'a> Writer for Response<'a, Streaming> { | ||||
|     fn write(&mut self, msg: &[u8]) -> IoResult<()> { | ||||
|     fn write_all(&mut self, msg: &[u8]) -> IoResult<()> { | ||||
|         debug!("write {:?} bytes", msg.len()); | ||||
|         self.body.write(msg) | ||||
|         self.body.write_all(msg) | ||||
|     } | ||||
|  | ||||
|     fn flush(&mut self) -> IoResult<()> { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user