Skip to content

Commit a78f9b4

Browse files
committed
Merge branch 'prepare-0.3-release'
2 parents 77c4081 + 8d3af02 commit a78f9b4

File tree

6 files changed

+37
-17
lines changed

6 files changed

+37
-17
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [Unreleased]
88

99

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+
1016
## [0.2.2] - 2017-10-05
1117
### Added
1218
- Add integration test in http crate. Testing actual network traffic.

core/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "jsonrpc-client-core"
3-
version = "0.2.1"
3+
version = "0.3.0"
44
authors = ["Mullvad VPN <admin@mullvad.net>", "Linus Färnstrand <linus@mullvad.net>"]
55
description = "A crate for generating transport agnostic, auto serializing, strongly typed JSON-RPC 2.0 clients"
66
readme = "../README.md"
@@ -12,8 +12,8 @@ license = "MIT/Apache-2.0"
1212
[dependencies]
1313
error-chain = "0.11"
1414
futures = "0.1"
15-
jsonrpc-core = "7.1.1"
16-
log = "0.3"
15+
jsonrpc-core = "8.0"
16+
log = "0.4"
1717
serde = "1.0"
1818
serde_json = "1.0"
1919

core/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
//! # Example
2727
//!
2828
//! ```rust,ignore
29-
//! #[macro_use] extern crate jsonrpc_client_core;
29+
//! #[macro_use]
30+
//! extern crate jsonrpc_client_core;
3031
//! extern crate jsonrpc_client_http;
3132
//!
3233
//! use jsonrpc_client_http::HttpTransport;
@@ -38,7 +39,9 @@
3839
//!
3940
//! fn main() {
4041
//! 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();
4245
//! let mut client = FizzBuzzClient::new(transport_handle);
4346
//! let result1 = client.fizz_buzz(3).call().unwrap();
4447
//! let result2 = client.fizz_buzz(4).call().unwrap();
@@ -212,7 +215,6 @@ where
212215
}
213216

214217

215-
216218
#[cfg(test)]
217219
mod tests {
218220
use super::*;

http/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "jsonrpc-client-http"
3-
version = "0.2.2"
3+
version = "0.3.0"
44
authors = ["Mullvad VPN <admin@mullvad.net>", "Linus Färnstrand <linus@mullvad.net>"]
55
description = "A transport implementation for jsonrpc-client-core based on Hyper and futures"
66
readme = "README.md"
@@ -15,20 +15,20 @@ futures = "0.1.15"
1515
hyper = "0.11"
1616
hyper-tls = { version = "0.1", optional = true }
1717
native-tls = { version = "0.1", optional = true }
18-
log = "0.3"
18+
log = "0.4"
1919
tokio-core = "0.1"
2020

21-
jsonrpc-client-core = { version = "0.2.1", path = "../core" }
21+
jsonrpc-client-core = { version = "0.3", path = "../core" }
2222

2323
[features]
2424
default = ["tls"]
2525
tls = ["hyper-tls", "native-tls"]
2626

2727
[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"
3232

3333

3434
[badges]

http/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl HttpTransport {
206206
}
207207

208208
/// 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
210210
/// [`with_client`](#method.with_client) for an example.
211211
pub fn with_client_shared<C>(client_creator: C, handle: &Handle) -> Result<HttpTransport>
212212
where
@@ -298,9 +298,7 @@ fn create_request_processing_future<CC: hyper::client::Connect>(
298298
future::err(ErrorKind::HttpError(response.status()).into())
299299
}
300300
})
301-
.and_then(|response: hyper::Response| {
302-
response.body().concat2().from_err()
303-
})
301+
.and_then(|response: hyper::Response| response.body().concat2().from_err())
304302
.map(|response_chunk| response_chunk.to_vec())
305303
.then(move |response_result| {
306304
if let Err(_) = response_tx.send(response_result) {

rustfmt.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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

0 commit comments

Comments
 (0)