chore(nightly): remove ()'s and fix benchmarks for nightly
Also ensure that `cargo bench` runs successfully on travis; the old `cargo bench ... || :` has the effect of ignoring any errors in it.
This commit is contained in:
12
benches/client.rs
Normal file → Executable file
12
benches/client.rs
Normal file → Executable file
@@ -7,6 +7,8 @@ extern crate test;
|
||||
use std::fmt;
|
||||
use std::io::{self, Read, Write, Cursor};
|
||||
use std::net::SocketAddr;
|
||||
#[cfg(feature = "timeouts")]
|
||||
use std::time::Duration;
|
||||
|
||||
use hyper::net;
|
||||
|
||||
@@ -73,6 +75,16 @@ impl net::NetworkStream for MockStream {
|
||||
fn peer_addr(&mut self) -> io::Result<SocketAddr> {
|
||||
Ok("127.0.0.1:1337".parse().unwrap())
|
||||
}
|
||||
#[cfg(feature = "timeouts")]
|
||||
fn set_read_timeout(&self, _: Option<Duration>) -> io::Result<()> {
|
||||
// can't time out
|
||||
Ok(())
|
||||
}
|
||||
#[cfg(feature = "timeouts")]
|
||||
fn set_write_timeout(&self, _: Option<Duration>) -> io::Result<()> {
|
||||
// can't time out
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
struct MockConnector;
|
||||
|
||||
Reference in New Issue
Block a user