From 54559a3688f5b504d9eb7c2bfb318c59668d5330 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 22 Dec 2019 02:50:50 +0900 Subject: [PATCH] Fix unused imports on Windows --- src/server.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/server.rs b/src/server.rs index 72ef7255..2830f874 100644 --- a/src/server.rs +++ b/src/server.rs @@ -3,16 +3,22 @@ use std::sync::{Arc, Mutex}; use std::{fmt, io, net}; use actix_http::{ - body::MessageBody, Error, HttpService, KeepAlive, Protocol, Request, Response, + body::MessageBody, Error, HttpService, KeepAlive, Request, Response, }; use actix_server::{Server, ServerBuilder}; use actix_service::{ - map_config, pipeline_factory, IntoServiceFactory, Service, ServiceFactory, + map_config, IntoServiceFactory, Service, ServiceFactory, }; -use futures::future::ok; use net2::TcpBuilder; +#[cfg(unix)] +use actix_http::Protocol; +#[cfg(unix)] +use actix_service::pipeline_factory; +#[cfg(unix)] +use futures::future::ok; + #[cfg(feature = "openssl")] use actix_tls::openssl::{AlpnError, SslAcceptor, SslAcceptorBuilder}; #[cfg(feature = "rustls")]