update benches with trait splits

This commit is contained in:
Sean McArthur
2014-10-31 16:00:34 -07:00
parent f117ebe367
commit 4dd1fc5642
2 changed files with 11 additions and 3 deletions

View File

@@ -55,6 +55,9 @@ impl hyper::header::Header for Foo {
fn parse_header(_: &[Vec<u8>]) -> Option<Foo> {
None
}
}
impl hyper::header::HeaderFormat for Foo {
fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
"Bar".fmt(fmt)
}

View File

@@ -77,20 +77,25 @@ impl hyper::header::Header for Foo {
fn parse_header(_: &[Vec<u8>]) -> Option<Foo> {
None
}
}
impl hyper::header::HeaderFormat for Foo {
fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
"Bar".fmt(fmt)
}
}
impl net::NetworkStream for MockStream {
fn peer_name(&mut self) -> IoResult<SocketAddr> {
Ok(from_str("127.0.0.1:1337").unwrap())
}
}
impl net::NetworkConnector for MockStream {
fn connect(_host: &str, _port: u16, _scheme: &str) -> IoResult<MockStream> {
Ok(MockStream::new())
}
fn peer_name(&mut self) -> IoResult<SocketAddr> {
Ok(from_str("127.0.0.1:1337").unwrap())
}
}
#[bench]