From 1a18c4bd11b32bb1bcc9e8c7621c30317356ede9 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 8 Oct 2023 15:31:48 +0900 Subject: [PATCH] Migrate to Rust 2021 --- Cargo.toml | 2 +- examples/client/Cargo.toml | 3 ++- examples/client/src/main.rs | 1 - examples/server/Cargo.toml | 3 ++- src/common/test_stream.rs | 2 -- tests/badssl.rs | 1 - tests/early-data.rs | 1 - tests/test.rs | 1 - 8 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6420a70..97aeefc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ documentation = "https://docs.rs/async-rustls" readme = "README.md" description = "Asynchronous TLS/SSL streams using Rustls." categories = ["asynchronous", "cryptography", "network-programming"] -edition = "2018" +edition = "2021" [workspace] resolver = "2" diff --git a/examples/client/Cargo.toml b/examples/client/Cargo.toml index f34365c..ef832ad 100644 --- a/examples/client/Cargo.toml +++ b/examples/client/Cargo.toml @@ -2,7 +2,8 @@ name = "client" version = "0.1.0" authors = ["quininer ", "John Nunley "] -edition = "2018" +edition = "2021" +publish = false [dependencies] argh = "0.1" diff --git a/examples/client/src/main.rs b/examples/client/src/main.rs index 2823289..2a59982 100644 --- a/examples/client/src/main.rs +++ b/examples/client/src/main.rs @@ -5,7 +5,6 @@ use smol::io::{copy, split, AsyncWriteExt}; use smol::net::TcpStream; use smol::prelude::*; use smol::Unblock; -use std::convert::TryFrom; use std::fs::File; use std::io; use std::io::BufReader; diff --git a/examples/server/Cargo.toml b/examples/server/Cargo.toml index 901b1fd..f63385c 100644 --- a/examples/server/Cargo.toml +++ b/examples/server/Cargo.toml @@ -2,7 +2,8 @@ name = "server" version = "0.1.0" authors = ["quininer ", "John Nunley "] -edition = "2018" +edition = "2021" +publish = false [dependencies] argh = "0.1" diff --git a/src/common/test_stream.rs b/src/common/test_stream.rs index 528fc3e..22c561d 100644 --- a/src/common/test_stream.rs +++ b/src/common/test_stream.rs @@ -256,8 +256,6 @@ fn stream_eof() -> io::Result<()> { } fn make_pair() -> (ServerConnection, ClientConnection) { - use std::convert::TryFrom; - let (sconfig, cconfig) = utils::make_configs(); let server = ServerConnection::new(sconfig).unwrap(); diff --git a/tests/badssl.rs b/tests/badssl.rs index e74a226..f52e975 100644 --- a/tests/badssl.rs +++ b/tests/badssl.rs @@ -5,7 +5,6 @@ use async_rustls::{ }; use smol::io::{AsyncReadExt, AsyncWriteExt}; use smol::net::TcpStream; -use std::convert::TryFrom; use std::io; use std::net::ToSocketAddrs; use std::sync::Arc; diff --git a/tests/early-data.rs b/tests/early-data.rs index a103008..52b1d20 100644 --- a/tests/early-data.rs +++ b/tests/early-data.rs @@ -9,7 +9,6 @@ use smol::net::TcpStream; use smol::prelude::*; use smol::Timer; use smol::{future, future::Future}; -use std::convert::TryFrom; use std::io::{self, BufRead, BufReader, Cursor}; use std::net::SocketAddr; use std::pin::Pin; diff --git a/tests/test.rs b/tests/test.rs index 5dcae3f..9f4d274 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -6,7 +6,6 @@ use rustls_pemfile::{certs, rsa_private_keys}; use smol::io::{copy, split, AssertAsync, AsyncReadExt, AsyncWriteExt}; use smol::net::{TcpListener, TcpStream}; use smol::prelude::*; -use std::convert::TryFrom; use std::io::{BufReader, Cursor, ErrorKind}; use std::net::SocketAddr; use std::sync::mpsc::channel;