diff --git a/src/dev.rs b/src/dev.rs deleted file mode 100644 index 833fecf0..00000000 --- a/src/dev.rs +++ /dev/null @@ -1,20 +0,0 @@ -//! The `actix-web` prelude for library developers -//! -//! The purpose of this module is to alleviate imports of many common actix traits -//! by adding a glob import to the top of actix heavy modules: -//! -//! ``` -//! # #![allow(unused_imports)] -//! use actix_web::dev::*; -//! ``` - -// dev specific -pub use info::ConnectionInfo; -pub use handler::Handler; -pub use router::Router; -pub use pipeline::Pipeline; -pub use channel::{HttpChannel, HttpHandler, IntoHttpHandler}; -pub use recognizer::{FromParam, RouteRecognizer, Pattern, PatternElement}; - -pub use cookie::CookieBuilder; -pub use httpresponse::HttpResponseBuilder; diff --git a/src/httprequest.rs b/src/httprequest.rs index 807059b1..11acf1d7 100644 --- a/src/httprequest.rs +++ b/src/httprequest.rs @@ -6,9 +6,10 @@ use std::collections::HashMap; use bytes::BytesMut; use futures::{Async, Future, Stream, Poll}; use url::{Url, form_urlencoded}; +pub use http_range::HttpRange; use http::{header, Uri, Method, Version, HeaderMap, Extensions}; -use {Cookie, HttpRange}; +use Cookie; use info::ConnectionInfo; use router::Router; use recognizer::Params; diff --git a/src/lib.rs b/src/lib.rs index f490ec44..8eaec276 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,7 +73,6 @@ mod h2writer; pub mod fs; pub mod ws; -pub mod dev; pub mod error; pub mod httpcodes; pub mod multipart; @@ -89,14 +88,12 @@ pub use payload::{Payload, PayloadItem}; pub use handler::{Reply, Json, FromRequest}; pub use route::Route; pub use resource::Resource; -pub use recognizer::Params; pub use server::HttpServer; pub use context::HttpContext; // re-exports pub use http::{Method, StatusCode, Version}; pub use cookie::Cookie; -pub use http_range::HttpRange; #[doc(hidden)] #[cfg(feature="tls")] @@ -105,3 +102,27 @@ pub use native_tls::Pkcs12; #[doc(hidden)] #[cfg(feature="openssl")] pub use openssl::pkcs12::Pkcs12; + +pub mod dev { +//! The `actix-web` prelude for library developers +//! +//! The purpose of this module is to alleviate imports of many common actix traits +//! by adding a glob import to the top of actix heavy modules: +//! +//! ``` +//! # #![allow(unused_imports)] +//! use actix_web::dev::*; +//! ``` + + // dev specific + pub use info::ConnectionInfo; + pub use handler::Handler; + pub use router::Router; + pub use pipeline::Pipeline; + pub use channel::{HttpChannel, HttpHandler, IntoHttpHandler}; + pub use recognizer::{FromParam, RouteRecognizer, Params, Pattern, PatternElement}; + + pub use cookie::CookieBuilder; + pub use http_range::HttpRange; + pub use httpresponse::HttpResponseBuilder; +}