diff --git a/actix-service/CHANGES.md b/actix-service/CHANGES.md index 4aa8a31b..d223e81a 100644 --- a/actix-service/CHANGES.md +++ b/actix-service/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [1.0.2] - 2020-01-08 + +### Added + +* Add `into_service` helper function + + ## [1.0.1] - 2019-12-22 ### Changed diff --git a/actix-service/Cargo.toml b/actix-service/Cargo.toml index cd6507fa..125ec10a 100644 --- a/actix-service/Cargo.toml +++ b/actix-service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-service" -version = "1.0.1" +version = "1.0.2" authors = ["Nikolay Kim "] description = "Actix service" keywords = ["network", "framework", "async", "futures"] @@ -10,7 +10,6 @@ documentation = "https://docs.rs/actix-service/" categories = ["network-programming", "asynchronous"] license = "MIT/Apache-2.0" edition = "2018" -workspace = ".." [badges] travis-ci = { repository = "actix/actix-service", branch = "master" } diff --git a/actix-service/src/lib.rs b/actix-service/src/lib.rs index 2b0a876a..00417706 100644 --- a/actix-service/src/lib.rs +++ b/actix-service/src/lib.rs @@ -351,6 +351,15 @@ where } } +/// Convert object of type `T` to a service `S` +pub fn into_service(tp: T) -> S +where + S: Service, + T: IntoService, +{ + tp.into_service() +} + pub mod dev { pub use crate::and_then::{AndThenService, AndThenServiceFactory}; pub use crate::and_then_apply_fn::{AndThenApplyFn, AndThenApplyFnFactory};