@@ -19,15 +19,17 @@ use backtrace::Backtrace;
1919use log:: trace;
2020use reqwest:: { Client as HttpClient , StatusCode , header:: HeaderMap } ;
2121use serde:: Serialize ;
22- use std:: fmt;
22+ use serde:: de:: DeserializeOwned ;
23+ use std:: fmt:: Display ;
2324use std:: future:: Future ;
25+ use std:: result;
2426use std:: time:: Duration ;
2527use tokio:: time:: sleep;
2628
2729pub type HttpClientResponse = reqwest:: Response ;
2830pub type HttpClientError = crate :: error:: HttpClientError ;
2931
30- pub type Result < T > = std :: result:: Result < T , HttpClientError > ;
32+ pub type Result < T > = result:: Result < T , HttpClientError > ;
3133
3234/// A `ClientBuilder` can be used to create a `Client` with custom configuration.
3335///
@@ -83,9 +85,9 @@ impl ClientBuilder {
8385
8486impl < E , U , P > ClientBuilder < E , U , P >
8587where
86- E : fmt :: Display ,
87- U : fmt :: Display ,
88- P : fmt :: Display ,
88+ E : Display ,
89+ U : Display ,
90+ P : Display ,
8991{
9092 /// Sets the API credentials.
9193 pub fn with_basic_auth_credentials < NewU , NewP > (
9496 password : NewP ,
9597 ) -> ClientBuilder < E , NewU , NewP >
9698 where
97- NewU : fmt :: Display ,
98- NewP : fmt :: Display ,
99+ NewU : Display ,
100+ NewP : Display ,
99101 {
100102 ClientBuilder {
101103 endpoint : self . endpoint ,
@@ -113,7 +115,7 @@ where
113115 /// Some examples: `http://localhost:15672/api` or `https://rabbitmq.example.com:15672/api`.
114116 pub fn with_endpoint < T > ( self , endpoint : T ) -> ClientBuilder < T , U , P >
115117 where
116- T : fmt :: Display ,
118+ T : Display ,
117119 {
118120 ClientBuilder {
119121 endpoint,
@@ -235,9 +237,9 @@ pub struct Client<E, U, P> {
235237
236238impl < E , U , P > Client < E , U , P >
237239where
238- E : fmt :: Display ,
239- U : fmt :: Display ,
240- P : fmt :: Display ,
240+ E : Display ,
241+ U : Display ,
242+ P : Display ,
241243{
242244 /// Instantiates a client for the specified endpoint with username and password.
243245 ///
@@ -368,7 +370,7 @@ where
368370
369371 pub ( crate ) async fn get_api_request < T , S > ( & self , path : S ) -> Result < T >
370372 where
371- T : serde :: de :: DeserializeOwned ,
373+ T : DeserializeOwned ,
372374 S : AsRef < str > ,
373375 {
374376 let response = self . http_get ( path, None , None ) . await ?;
0 commit comments