diff options
| author | Steven Fackler <[email protected]> | 2015-01-28 08:47:16 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-01-28 08:47:16 -0800 |
| commit | 030cf5fe88f292a48b71789f5d0e9a9b133c5c09 (patch) | |
| tree | e105f6e7ddf28efbc6f58f8424f87b1b1bc46da6 /src/ssl/tests.rs | |
| parent | Release v0.2.17 (diff) | |
| download | rust-openssl-030cf5fe88f292a48b71789f5d0e9a9b133c5c09.tar.xz rust-openssl-030cf5fe88f292a48b71789f5d0e9a9b133c5c09.zip | |
Fix for IO changes
Diffstat (limited to 'src/ssl/tests.rs')
| -rw-r--r-- | src/ssl/tests.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ssl/tests.rs b/src/ssl/tests.rs index d78e21c5..77a3118d 100644 --- a/src/ssl/tests.rs +++ b/src/ssl/tests.rs @@ -1,6 +1,6 @@ use serialize::hex::FromHex; -use std::io::net::tcp::TcpStream; -use std::io::{Writer}; +use std::old_io::net::tcp::TcpStream; +use std::old_io::{Writer}; use std::thread::Thread; use crypto::hash::HashType::{SHA256}; @@ -179,9 +179,9 @@ fn test_verify_callback_data() { fn test_write() { let stream = TcpStream::connect("127.0.0.1:15418").unwrap(); let mut stream = SslStream::new(&SslContext::new(Sslv23).unwrap(), stream).unwrap(); - stream.write("hello".as_bytes()).unwrap(); + stream.write_all("hello".as_bytes()).unwrap(); stream.flush().unwrap(); - stream.write(" there".as_bytes()).unwrap(); + stream.write_all(" there".as_bytes()).unwrap(); stream.flush().unwrap(); } @@ -189,7 +189,7 @@ fn test_write() { fn test_read() { let stream = TcpStream::connect("127.0.0.1:15418").unwrap(); let mut stream = SslStream::new(&SslContext::new(Sslv23).unwrap(), stream).unwrap(); - stream.write("GET /\r\n\r\n".as_bytes()).unwrap(); + stream.write_all("GET /\r\n\r\n".as_bytes()).unwrap(); stream.flush().unwrap(); stream.read_to_end().ok().expect("read error"); } @@ -200,7 +200,7 @@ fn test_clone() { let mut stream = SslStream::new(&SslContext::new(Sslv23).unwrap(), stream).unwrap(); let mut stream2 = stream.clone(); let _t = Thread::spawn(move || { - stream2.write("GET /\r\n\r\n".as_bytes()).unwrap(); + stream2.write_all("GET /\r\n\r\n".as_bytes()).unwrap(); stream2.flush().unwrap(); }); stream.read_to_end().ok().expect("read error"); |