update using ToSocketAddr

This commit is contained in:
Sean McArthur
2014-11-06 17:50:08 -08:00
parent a1b1968797
commit 3d7820d17e
5 changed files with 16 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ extern crate test;
use std::fmt::{mod, Show};
use std::from_str::from_str;
use std::io::{IoResult, MemReader};
use std::io::net::ip::SocketAddr;
use std::io::net::ip::{SocketAddr, ToSocketAddr};
use std::os;
use std::path::BytesContainer;
@@ -92,7 +92,7 @@ impl net::NetworkStream for MockStream {
}
impl net::NetworkConnector for MockStream {
fn connect(_host: &str, _port: u16, _scheme: &str) -> IoResult<MockStream> {
fn connect<To: ToSocketAddr>(_addr: To, _scheme: &str) -> IoResult<MockStream> {
Ok(MockStream::new())
}