fix(rustup): adapt to current rustc

Closes #381.
This commit is contained in:
Adrian Heine
2015-03-19 09:17:15 +01:00
parent 7469e62d1e
commit 1f0bc951c9
7 changed files with 14 additions and 16 deletions

View File

@@ -5,7 +5,7 @@ extern crate test;
use test::Bencher;
use std::io::{Read, Write};
use std::net::IpAddr;
use std::net::Ipv4Addr;
use hyper::method::Method::Get;
use hyper::server::{Request, Response};
@@ -27,7 +27,7 @@ fn hyper_handle(_: Request, res: Response) {
#[bench]
fn bench_hyper(b: &mut Bencher) {
let server = hyper::Server::http(hyper_handle);
let mut listener = server.listen(IpAddr::new_v4(127, 0, 0, 1), 0).unwrap();
let mut listener = server.listen(Ipv4Addr::new(127, 0, 0, 1), 0).unwrap();
let url = hyper::Url::parse(&*format!("http://{}", listener.socket)).unwrap();
b.iter(|| request(url.clone()));