Skip to content

Commit

Permalink
chore: migrate to rust 2021 (#618)
Browse files Browse the repository at this point in the history
Implies MSRV 1.56.x
  • Loading branch information
niklasad1 authored Dec 22, 2021
1 parent 8462905 commit 1e77c2d
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-benchmarks"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Benchmarks for jsonrpsee"
edition = "2018"
edition = "2021"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion client/http-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-http-client"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "HTTP client for JSON-RPC"
edition = "2018"
edition = "2021"
license = "MIT"
repository = "https://github.com/paritytech/jsonrpsee"
homepage = "https://github.com/paritytech/jsonrpsee"
Expand Down
2 changes: 1 addition & 1 deletion client/transport/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-client-transport"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "WebSocket client for JSON-RPC"
edition = "2018"
edition = "2021"
license = "MIT"
repository = "https://github.com/paritytech/jsonrpsee"
homepage = "https://github.com/paritytech/jsonrpsee"
Expand Down
2 changes: 0 additions & 2 deletions client/transport/src/ws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

mod stream;

use std::convert::{TryFrom, TryInto};
use std::io;
use std::net::{SocketAddr, ToSocketAddrs};
use std::time::Duration;
Expand Down Expand Up @@ -505,7 +504,6 @@ fn build_tls_config(cert_store: &CertificateStore) -> Result<tokio_rustls::TlsCo
mod tests {
use super::{Mode, Target, Uri, WsHandshakeError};
use http::uri::InvalidUri;
use std::convert::TryInto;

fn assert_ws_target(target: Target, host: &str, host_header: &str, mode: Mode, path_and_query: &str) {
assert_eq!(&target.host, host);
Expand Down
2 changes: 1 addition & 1 deletion client/ws-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-ws-client"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "WebSocket client for JSON-RPC"
edition = "2018"
edition = "2021"
license = "MIT"
repository = "https://github.com/paritytech/jsonrpsee"
homepage = "https://github.com/paritytech/jsonrpsee"
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-core"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Utilities for jsonrpsee"
edition = "2018"
edition = "2021"
license = "MIT"

[dependencies]
Expand Down
1 change: 0 additions & 1 deletion core/src/client/async_client/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

use std::convert::TryInto;
use std::time::Duration;

use crate::client::async_client::manager::{RequestManager, RequestStatus};
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-examples"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Examples for jsonrpsee"
edition = "2018"
edition = "2021"
publish = false

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion http-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-http-server"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "HTTP server for JSON-RPC"
edition = "2018"
edition = "2021"
license = "MIT"
repository = "https://github.com/paritytech/jsonrpsee"
homepage = "https://github.com/paritytech/jsonrpsee"
Expand Down
2 changes: 1 addition & 1 deletion jsonrpsee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "JSON-RPC crate"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
license = "MIT"
edition = "2018"
edition = "2021"
repository = "https://github.com/paritytech/jsonrpsee"
homepage = "https://github.com/paritytech/jsonrpsee"
documentation = "https://docs.rs/jsonrpsee"
Expand Down
2 changes: 1 addition & 1 deletion proc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Procedueral macros for jsonrpsee"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
license = "MIT"
edition = "2018"
edition = "2021"
repository = "https://github.com/paritytech/jsonrpsee"
homepage = "https://github.com/paritytech/jsonrpsee"
documentation = "https://docs.rs/jsonrpsee-proc-macros"
Expand Down
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hard_tabs = true
max_width = 120
use_small_heuristics = "Max"
edition = "2018"
edition = "2021"
2 changes: 1 addition & 1 deletion test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-test-utils"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-integration-tests"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Integration tests for jsonrpsee"
edition = "2018"
edition = "2021"
license = "MIT"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-types"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Shared types for jsonrpsee"
edition = "2018"
edition = "2021"
license = "MIT"
repository = "https://github.com/paritytech/jsonrpsee"
homepage = "https://github.com/paritytech/jsonrpsee"
Expand Down
1 change: 0 additions & 1 deletion types/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
//! Types to handle JSON-RPC request parameters according to the [spec](https://www.jsonrpc.org/specification#parameter_structures).
//! Some types come with a "*Ser" variant that implements [`serde::Serialize`]; these are used in the client.
use std::convert::TryFrom;
use std::fmt;

use crate::error::CallError;
Expand Down
2 changes: 1 addition & 1 deletion ws-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jsonrpsee-ws-server"
version = "0.6.1"
authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "WebSocket server for JSON-RPC"
edition = "2018"
edition = "2021"
license = "MIT"
repository = "https://github.com/paritytech/jsonrpsee"
homepage = "https://github.com/paritytech/jsonrpsee"
Expand Down
4 changes: 2 additions & 2 deletions ws-server/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async fn server_with_handles() -> (SocketAddr, ServerHandle) {
module
.register_subscription("subscribe_hello", "subscribe_hello", "unsubscribe_hello", |_, sink, _| {
std::thread::spawn(move || loop {
let _ = sink;
let _ = &sink;
std::thread::sleep(std::time::Duration::from_secs(30));
});
Ok(())
Expand Down Expand Up @@ -653,7 +653,7 @@ async fn custom_subscription_id_works() {
module
.register_subscription("subscribe_hello", "subscribe_hello", "unsubscribe_hello", |_, sink, _| {
std::thread::spawn(move || loop {
let _ = sink;
let _ = &sink;
std::thread::sleep(std::time::Duration::from_secs(30));
});
Ok(())
Expand Down

0 comments on commit 1e77c2d

Please sign in to comment.