File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ use std::convert::TryFrom;
1111use std:: fmt:: Debug ;
1212use std:: io;
1313use std:: str:: FromStr ;
14- use std:: sync:: Arc ;
1514
1615type HyperRequest = hyper:: Request < hyper:: Body > ;
1716
@@ -28,28 +27,22 @@ impl<C: Clone + Connect + Debug + Send + Sync + 'static> HyperClientObject for h
2827
2928/// Hyper-based HTTP Client.
3029#[ derive( Debug ) ]
31- pub struct HyperClient ( Arc < dyn HyperClientObject > ) ;
30+ pub struct HyperClient ( Box < dyn HyperClientObject > ) ;
3231
3332impl HyperClient {
3433 /// Create a new client instance.
3534 pub fn new ( ) -> Self {
3635 let https = HttpsConnector :: new ( ) ;
3736 let client = hyper:: Client :: builder ( ) . build ( https) ;
38- Self ( Arc :: new ( client) )
37+ Self ( Box :: new ( client) )
3938 }
4039
4140 /// Create from externally initialized and configured client.
4241 pub fn from_client < C > ( client : hyper:: Client < C > ) -> Self
4342 where
4443 C : Clone + Connect + Debug + Send + Sync + ' static ,
4544 {
46- Self ( Arc :: new ( client) )
47- }
48- }
49-
50- impl Clone for HyperClient {
51- fn clone ( & self ) -> Self {
52- Self ( self . 0 . clone ( ) )
45+ Self ( Box :: new ( client) )
5346 }
5447}
5548
You can’t perform that action at this time.
0 commit comments