@@ -14,12 +14,22 @@ pub trait HttpClient {
1414 fn send_http (
1515 & self ,
1616 request : Request < Vec < u8 > > ,
17- ) -> impl Future < Output = core:: result:: Result < Response < Vec < u8 > > , Box < dyn std:: error:: Error + Send + Sync + ' static > > > ;
17+ ) -> impl Future <
18+ Output = core:: result:: Result <
19+ Response < Vec < u8 > > ,
20+ Box < dyn std:: error:: Error + Send + Sync + ' static > ,
21+ > ,
22+ > ;
1823 #[ cfg( not( target_arch = "wasm32" ) ) ]
1924 fn send_http (
2025 & self ,
2126 request : Request < Vec < u8 > > ,
22- ) -> impl Future < Output = core:: result:: Result < Response < Vec < u8 > > , Box < dyn std:: error:: Error + Send + Sync + ' static > > > + Send ;
27+ ) -> impl Future <
28+ Output = core:: result:: Result <
29+ Response < Vec < u8 > > ,
30+ Box < dyn std:: error:: Error + Send + Sync + ' static > ,
31+ > ,
32+ > + Send ;
2333}
2434
2535type XrpcResult < O , E > = core:: result:: Result < OutputDataOrBytes < O > , self :: Error < E > > ;
@@ -39,7 +49,10 @@ pub trait XrpcClient: HttpClient {
3949 }
4050 #[ allow( unused_variables) ]
4151 #[ cfg( not( target_arch = "wasm32" ) ) ]
42- fn authentication_token ( & self , is_refresh : bool ) -> impl Future < Output = Option < String > > + Send {
52+ fn authentication_token (
53+ & self ,
54+ is_refresh : bool ,
55+ ) -> impl Future < Output = Option < String > > + Send {
4356 async { None }
4457 }
4558 /// Get the `atproto-proxy` header.
@@ -62,7 +75,10 @@ pub trait XrpcClient: HttpClient {
6275 }
6376 /// Send an XRPC request and return the response.
6477 #[ cfg( target_arch = "wasm32" ) ]
65- fn send_xrpc < P , I , O , E > ( & self , request : & XrpcRequest < P , I > ) -> impl Future < Output = XrpcResult < O , E > >
78+ fn send_xrpc < P , I , O , E > (
79+ & self ,
80+ request : & XrpcRequest < P , I > ,
81+ ) -> impl Future < Output = XrpcResult < O , E > >
6682 where
6783 P : Serialize + Send + Sync ,
6884 I : Serialize + Send + Sync ,
@@ -72,7 +88,10 @@ pub trait XrpcClient: HttpClient {
7288 send_xrpc ( self , request)
7389 }
7490 #[ cfg( not( target_arch = "wasm32" ) ) ]
75- fn send_xrpc < P , I , O , E > ( & self , request : & XrpcRequest < P , I > ) -> impl Future < Output = XrpcResult < O , E > > + Send
91+ fn send_xrpc < P , I , O , E > (
92+ & self ,
93+ request : & XrpcRequest < P , I > ,
94+ ) -> impl Future < Output = XrpcResult < O , E > > + Send
7695 where
7796 P : Serialize + Send + Sync ,
7897 I : Serialize + Send + Sync ,
@@ -85,7 +104,10 @@ pub trait XrpcClient: HttpClient {
85104}
86105
87106#[ inline( always) ]
88- async fn send_xrpc < P , I , O , E , C : XrpcClient + ?Sized > ( client : & C , request : & XrpcRequest < P , I > ) -> XrpcResult < O , E >
107+ async fn send_xrpc < P , I , O , E , C : XrpcClient + ?Sized > (
108+ client : & C ,
109+ request : & XrpcRequest < P , I > ,
110+ ) -> XrpcResult < O , E >
89111where
90112 P : Serialize + Send + Sync ,
91113 I : Serialize + Send + Sync ,
@@ -148,4 +170,4 @@ where
148170 error : serde_json:: from_slice :: < XrpcErrorKind < E > > ( & body) . ok ( ) ,
149171 } ) )
150172 }
151- }
173+ }
0 commit comments