File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 26
26
//! # Example
27
27
//!
28
28
//! ```rust,ignore
29
- //! #[macro_use] extern crate jsonrpc_client_core;
29
+ //! #[macro_use]
30
+ //! extern crate jsonrpc_client_core;
30
31
//! extern crate jsonrpc_client_http;
31
32
//!
32
33
//! use jsonrpc_client_http::HttpTransport;
38
39
//!
39
40
//! fn main() {
40
41
//! let transport = HttpTransport::new().unwrap();
41
- //! let transport_handle = transport.handle("https://api.fizzbuzzexample.org/rpc/").unwrap();
42
+ //! let transport_handle = transport
43
+ //! .handle("https://api.fizzbuzzexample.org/rpc/")
44
+ //! .unwrap();
42
45
//! let mut client = FizzBuzzClient::new(transport_handle);
43
46
//! let result1 = client.fizz_buzz(3).call().unwrap();
44
47
//! let result2 = client.fizz_buzz(4).call().unwrap();
@@ -212,7 +215,6 @@ where
212
215
}
213
216
214
217
215
-
216
218
#[ cfg( test) ]
217
219
mod tests {
218
220
use super :: * ;
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ impl HttpTransport {
206
206
}
207
207
208
208
/// Creates a `HttpTransport` backed by the Tokio `Handle` given to it, just like
209
- ///[`shared`](#method.shared), but with a custom Hyper Client. See
209
+ /// [`shared`](#method.shared), but with a custom Hyper Client. See
210
210
/// [`with_client`](#method.with_client) for an example.
211
211
pub fn with_client_shared < C > ( client_creator : C , handle : & Handle ) -> Result < HttpTransport >
212
212
where
@@ -298,9 +298,7 @@ fn create_request_processing_future<CC: hyper::client::Connect>(
298
298
future:: err ( ErrorKind :: HttpError ( response. status ( ) ) . into ( ) )
299
299
}
300
300
} )
301
- . and_then ( |response : hyper:: Response | {
302
- response. body ( ) . concat2 ( ) . from_err ( )
303
- } )
301
+ . and_then ( |response : hyper:: Response | response. body ( ) . concat2 ( ) . from_err ( ) )
304
302
. map ( |response_chunk| response_chunk. to_vec ( ) )
305
303
. then ( move |response_result| {
306
304
if let Err ( _) = response_tx. send ( response_result) {
Original file line number Diff line number Diff line change
1
+ required_version = " 0.3.8"
2
+
3
+ # Activation of features, almost objectively better ;)
4
+ reorder_imports = true
5
+ reorder_imported_names = true
6
+ reorder_imports_in_group = true
7
+ use_try_shorthand = true
8
+ condense_wildcard_suffixes = true
9
+ normalize_comments = true
10
+ wrap_comments = true
11
+
12
+ # Heavily subjective style choices
13
+ comment_width = 100
14
+ blank_lines_upper_bound = 2
You can’t perform that action at this time.
0 commit comments