From 02fcaca3da0eeaf4a1dad783c1fde487cd637fc7 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 5 Apr 2019 11:36:26 -0700 Subject: [PATCH] add backward compatibility --- actix-http/src/client/connector.rs | 13 +++++++++++-- src/lib.rs | 5 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/actix-http/src/client/connector.rs b/actix-http/src/client/connector.rs index 8a0968f5..f476ad5f 100644 --- a/actix-http/src/client/connector.rs +++ b/actix-http/src/client/connector.rs @@ -173,8 +173,8 @@ where self } - /// Finish configuration process and create connector service. - /// The Connector builder always concludes by calling `finish()` last in + /// Finish configuration process and create connector service. + /// The Connector builder always concludes by calling `finish()` last in /// its combinator chain. pub fn finish( self, @@ -265,6 +265,15 @@ where } } } + + #[doc(hidden)] + #[deprecated(since = "0.1.0-alpha4", note = "please use `.finish()` method")] + pub fn service( + self, + ) -> impl Service + Clone + { + self.finish() + } } #[cfg(not(feature = "ssl"))] diff --git a/src/lib.rs b/src/lib.rs index a668b83b..39c054bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -189,6 +189,7 @@ pub mod client { pub use awc::error::{ ConnectError, InvalidUrl, PayloadError, SendRequestError, WsClientError, }; - pub use awc::{test, Client, ClientBuilder, ClientRequest, ClientResponse, - Connector}; + pub use awc::{ + test, Client, ClientBuilder, ClientRequest, ClientResponse, Connector, + }; }