Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to rust 2021 #618

Merged
merged 1 commit into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>"]
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 <[email protected]>", "Pierre Krieger <[email protected]>"]
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 <[email protected]>", "Pierre Krieger <[email protected]>"]
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 <[email protected]>", "Pierre Krieger <[email protected]>"]
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 <[email protected]>"]
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 <[email protected]>"]
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 <[email protected]>", "Pierre Krieger <[email protected]>"]
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 <[email protected]>", "Pierre Krieger <[email protected]>"]
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 <[email protected]>", "Pierre Krieger <[email protected]>"]
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 <[email protected]>"]
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 <[email protected]>"]
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 <[email protected]>"]
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 <[email protected]>", "Pierre Krieger <[email protected]>"]
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;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::thread::sleep(std::time::Duration::from_secs(30));
});
Ok(())
Expand Down