From 7ee33efdfd186a019e8f5692bd7c3a6e515070de Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 22 Feb 2019 18:20:54 -0800 Subject: [PATCH] moved boxed service and new service to actix-service --- actix-service/CHANGES.md | 4 ++++ actix-service/src/and_then_apply_fn.rs | 3 ++- {actix-utils => actix-service}/src/boxed.rs | 2 +- actix-service/src/lib.rs | 4 ++-- actix-utils/CHANGES.md | 9 +++++++++ actix-utils/src/lib.rs | 1 - 6 files changed, 18 insertions(+), 5 deletions(-) rename {actix-utils => actix-service}/src/boxed.rs (98%) diff --git a/actix-service/CHANGES.md b/actix-service/CHANGES.md index d4efa741..7a7c4070 100644 --- a/actix-service/CHANGES.md +++ b/actix-service/CHANGES.md @@ -2,6 +2,10 @@ ## [0.3.0] - 2019-02-xx +## Added + +* Added boxed NewService and Service. + ## Changed * Added `Config` argument to `NewService` trait. diff --git a/actix-service/src/and_then_apply_fn.rs b/actix-service/src/and_then_apply_fn.rs index 3ac7756a..8969042c 100644 --- a/actix-service/src/and_then_apply_fn.rs +++ b/actix-service/src/and_then_apply_fn.rs @@ -258,7 +258,8 @@ mod tests { use futures::future::{ok, FutureResult}; use futures::{Async, Future, Poll}; - use crate::{Blank, BlankNewService, NewService, Service, ServiceExt}; + use crate::blank::{Blank, BlankNewService}; + use crate::{NewService, Service, ServiceExt}; #[derive(Clone)] struct Srv; diff --git a/actix-utils/src/boxed.rs b/actix-service/src/boxed.rs similarity index 98% rename from actix-utils/src/boxed.rs rename to actix-service/src/boxed.rs index a34e78a1..2083d588 100644 --- a/actix-utils/src/boxed.rs +++ b/actix-service/src/boxed.rs @@ -1,4 +1,4 @@ -use actix_service::{NewService, Service}; +use crate::{NewService, Service}; use futures::{Future, Poll}; pub type BoxedService = Box< diff --git a/actix-service/src/lib.rs b/actix-service/src/lib.rs index 02603dbd..c4869947 100644 --- a/actix-service/src/lib.rs +++ b/actix-service/src/lib.rs @@ -7,7 +7,8 @@ mod and_then; mod and_then_apply; mod and_then_apply_fn; mod apply; -mod blank; +pub mod blank; +pub mod boxed; mod cell; mod fn_service; mod fn_transform; @@ -23,7 +24,6 @@ pub use self::and_then::{AndThen, AndThenNewService}; use self::and_then_apply::{AndThenTransform, AndThenTransformNewService}; use self::and_then_apply_fn::{AndThenApply, AndThenApplyNewService}; pub use self::apply::{Apply, ApplyNewService}; -pub use self::blank::{Blank, BlankNewService}; pub use self::fn_service::{fn_cfg_factory, fn_factory, fn_service, FnService}; pub use self::fn_transform::{FnNewTransform, FnTransform}; pub use self::from_err::{FromErr, FromErrNewService}; diff --git a/actix-utils/CHANGES.md b/actix-utils/CHANGES.md index 8d971113..6450f628 100644 --- a/actix-utils/CHANGES.md +++ b/actix-utils/CHANGES.md @@ -1,5 +1,14 @@ # Changes +## [0.3.0] - 2019-02-xx + +### Changed + +* Use new `NewService` trait + +* BoxedNewService` and `BoxedService` types moved to actix-service crate. + + ## [0.2.4] - 2019-02-21 ### Changed diff --git a/actix-utils/src/lib.rs b/actix-utils/src/lib.rs index bb5443e3..15bff92b 100644 --- a/actix-utils/src/lib.rs +++ b/actix-utils/src/lib.rs @@ -1,5 +1,4 @@ //! Actix utils - various helper services -pub mod boxed; mod cell; pub mod cloneable; pub mod counter;