diff --git a/.travis.yml b/.travis.yml index 47f61251..6b4c8fd7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,7 +72,7 @@ script: after_success: - | if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_RUST_VERSION" == "1.21.0" ]]; then - cargo doc --features alpn --no-deps && + cargo doc --features "alpn, tls" --no-deps && echo "" > target/doc/index.html && cargo install mdbook && cd guide && mdbook build -d ../target/doc/guide && cd .. && diff --git a/src/server/worker.rs b/src/server/worker.rs index 183a7007..6ee48e2d 100644 --- a/src/server/worker.rs +++ b/src/server/worker.rs @@ -6,15 +6,14 @@ use tokio_core::net::TcpStream; use tokio_core::reactor::Handle; use net2::TcpStreamExt; -#[cfg(feature="tls")] +#[cfg(any(feature="tls", feature="alpn"))] use futures::future; + #[cfg(feature="tls")] use native_tls::TlsAcceptor; #[cfg(feature="tls")] use tokio_tls::TlsAcceptorExt; -#[cfg(feature="alpn")] -use futures::future; #[cfg(feature="alpn")] use openssl::ssl::SslAcceptor; #[cfg(feature="alpn")]