From eb38a11b9ab401d6b909077f92507fa872349d13 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 26 Jun 2015 14:06:47 +0200 Subject: [PATCH] fix(benches): adjust to missing `set_ssl_verifier` In 53bba6e , ssl usage was improved. The existing benchmark implementation wasn't adjusted though. This commit fixes the client benchmark to work with the latest nightly rust and instructs travis to try compile the benchmarks when rustc nightly is used. This should prevent such kind of breakage in future. --- .travis.yml | 1 + benches/client.rs | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ecac5f4120..95978f094e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ cache: script: - cargo build --verbose $FEATURES - cargo test --verbose $FEATURES + - '[ $TRAVIS_RUST_VERSION = nightly ] && cargo bench --no-run || :' addons: apt: diff --git a/benches/client.rs b/benches/client.rs index ff11a712ca..d639c75ceb 100644 --- a/benches/client.rs +++ b/benches/client.rs @@ -1,5 +1,5 @@ #![deny(warnings)] -#![feature(collections, test)] +#![feature(vec_push_all, test)] extern crate hyper; extern crate test; @@ -8,7 +8,7 @@ use std::fmt; use std::io::{self, Read, Write, Cursor}; use std::net::SocketAddr; -use hyper::net::{self, ContextVerifier}; +use hyper::net; static README: &'static [u8] = include_bytes!("../README.md"); @@ -82,10 +82,6 @@ impl net::NetworkConnector for MockConnector { fn connect(&self, _: &str, _: u16, _: &str) -> hyper::Result { Ok(MockStream::new()) } - - fn set_ssl_verifier(&mut self, _verifier: ContextVerifier) { - // pass - } } #[bench]