From 8f66a11e5f1f4353e3fd7ec51c4ffc2c42655a65 Mon Sep 17 00:00:00 2001 From: Markus Kohlhase Date: Thu, 25 Nov 2021 18:17:30 +0100 Subject: [PATCH] Switch to Rust 2021 edition --- Cargo.toml | 2 +- examples/e2e_encryption/client/Cargo.toml | 2 +- examples/e2e_encryption/client/src/lib.rs | 1 - examples/e2e_encryption/server/Cargo.toml | 2 +- examples/e2e_encryption/server/src/main.rs | 1 - src/app/streams/backoff_stream.rs | 1 - src/browser/fetch/header.rs | 1 - src/browser/fetch/request.rs | 2 +- 8 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c08b86ad2..77a1cf939 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ documentation = "https://docs.rs/seed" readme = "README.md" keywords = ["wasm", "webassembly", "frontend", "framework", "web"] categories = ["wasm", "web-programming"] -edition = "2018" +edition = "2021" build = "build.rs" diff --git a/examples/e2e_encryption/client/Cargo.toml b/examples/e2e_encryption/client/Cargo.toml index a39935ef4..3c1f83037 100644 --- a/examples/e2e_encryption/client/Cargo.toml +++ b/examples/e2e_encryption/client/Cargo.toml @@ -2,7 +2,7 @@ name = "client" version = "0.1.0" authors = ["Your Name "] -edition = "2018" +edition = "2021" [lib] crate-type = ["cdylib"] diff --git a/examples/e2e_encryption/client/src/lib.rs b/examples/e2e_encryption/client/src/lib.rs index fdb178b39..dfec04752 100644 --- a/examples/e2e_encryption/client/src/lib.rs +++ b/examples/e2e_encryption/client/src/lib.rs @@ -8,7 +8,6 @@ use shared::{ rand_core::OsRng, DefaultCipherSuite, }; -use std::convert::TryInto; // ------ ------ // Init diff --git a/examples/e2e_encryption/server/Cargo.toml b/examples/e2e_encryption/server/Cargo.toml index fde328a68..0913c467f 100644 --- a/examples/e2e_encryption/server/Cargo.toml +++ b/examples/e2e_encryption/server/Cargo.toml @@ -2,7 +2,7 @@ name = "server" version = "0.1.0" authors = ["Your Name "] -edition = "2018" +edition = "2021" [dependencies] tokio = { version = "0.2", features = ["full"] } # sync with the one in `warp` diff --git a/examples/e2e_encryption/server/src/main.rs b/examples/e2e_encryption/server/src/main.rs index e06a89171..193015829 100644 --- a/examples/e2e_encryption/server/src/main.rs +++ b/examples/e2e_encryption/server/src/main.rs @@ -8,7 +8,6 @@ use shared::{ rand_core::OsRng, DefaultCipherSuite, }; -use std::convert::{TryFrom, TryInto}; use std::sync::Arc; use tokio::sync::Mutex; use warp::hyper::body::Bytes; diff --git a/src/app/streams/backoff_stream.rs b/src/app/streams/backoff_stream.rs index 515d94ca5..7692e245f 100644 --- a/src/app/streams/backoff_stream.rs +++ b/src/app/streams/backoff_stream.rs @@ -2,7 +2,6 @@ use futures::channel::mpsc; use futures::stream::Stream; use gloo_timers::callback::Timeout; use rand::{rngs::SmallRng, Rng, SeedableRng}; -use std::convert::TryFrom; use std::pin::Pin; use std::rc::Rc; use std::task::{Context, Poll}; diff --git a/src/browser/fetch/header.rs b/src/browser/fetch/header.rs index 9bf9da945..8c393dcaf 100644 --- a/src/browser/fetch/header.rs +++ b/src/browser/fetch/header.rs @@ -1,7 +1,6 @@ //! HTTP headers use std::borrow::Cow; -use std::iter::FromIterator; // ------ Headers ------ diff --git a/src/browser/fetch/request.rs b/src/browser/fetch/request.rs index d92430cf6..68094fbd4 100644 --- a/src/browser/fetch/request.rs +++ b/src/browser/fetch/request.rs @@ -7,7 +7,7 @@ use gloo_timers::callback::Timeout; use js_sys::Uint8Array; use serde::Serialize; use serde_wasm_bindgen as swb; -use std::{borrow::Cow, cell::RefCell, convert::TryFrom, rc::Rc}; +use std::{borrow::Cow, cell::RefCell, rc::Rc}; use wasm_bindgen::JsValue; /// Its methods configure the request, and handle the response. Many of them return the original