File tree Expand file tree Collapse file tree 6 files changed +37
-17
lines changed Expand file tree Collapse file tree 6 files changed +37
-17
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
## [ Unreleased]
8
8
9
9
10
+ ## [ 0.3.0] - 2018-03-06
11
+ ### Changed
12
+ - Move logging of json responses from debug to trace level.
13
+ - Remove ` Clone ` bound on ` Transport ` trait.
14
+
15
+
10
16
## [ 0.2.2] - 2017-10-05
11
17
### Added
12
18
- Add integration test in http crate. Testing actual network traffic.
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " jsonrpc-client-core"
3
- version = " 0.2.1 "
3
+ version = " 0.3.0 "
4
4
authors = [" Mullvad VPN <admin@mullvad.net>" , " Linus Färnstrand <linus@mullvad.net>" ]
5
5
description = " A crate for generating transport agnostic, auto serializing, strongly typed JSON-RPC 2.0 clients"
6
6
readme = " ../README.md"
@@ -12,8 +12,8 @@ license = "MIT/Apache-2.0"
12
12
[dependencies ]
13
13
error-chain = " 0.11"
14
14
futures = " 0.1"
15
- jsonrpc-core = " 7.1.1 "
16
- log = " 0.3 "
15
+ jsonrpc-core = " 8.0 "
16
+ log = " 0.4 "
17
17
serde = " 1.0"
18
18
serde_json = " 1.0"
19
19
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 1
1
[package ]
2
2
name = " jsonrpc-client-http"
3
- version = " 0.2.2 "
3
+ version = " 0.3.0 "
4
4
authors = [" Mullvad VPN <admin@mullvad.net>" , " Linus Färnstrand <linus@mullvad.net>" ]
5
5
description = " A transport implementation for jsonrpc-client-core based on Hyper and futures"
6
6
readme = " README.md"
@@ -15,20 +15,20 @@ futures = "0.1.15"
15
15
hyper = " 0.11"
16
16
hyper-tls = { version = " 0.1" , optional = true }
17
17
native-tls = { version = " 0.1" , optional = true }
18
- log = " 0.3 "
18
+ log = " 0.4 "
19
19
tokio-core = " 0.1"
20
20
21
- jsonrpc-client-core = { version = " 0.2.1 " , path = " ../core" }
21
+ jsonrpc-client-core = { version = " 0.3 " , path = " ../core" }
22
22
23
23
[features ]
24
24
default = [" tls" ]
25
25
tls = [" hyper-tls" , " native-tls" ]
26
26
27
27
[dev-dependencies ]
28
- env_logger = " 0.4 "
29
- jsonrpc-core = " 7.1.1 "
30
- jsonrpc-macros = " 7.1.1 "
31
- jsonrpc-http-server = " 7.1.1 "
28
+ env_logger = " 0.5 "
29
+ jsonrpc-core = " 8.0 "
30
+ jsonrpc-macros = " 8.0 "
31
+ jsonrpc-http-server = " 8.0 "
32
32
33
33
34
34
[badges ]
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