diff --git a/core/http/src/ext.rs b/core/http/src/ext.rs index a514cd74..1e263d4e 100644 --- a/core/http/src/ext.rs +++ b/core/http/src/ext.rs @@ -1,8 +1,5 @@ //! Extension traits implemented by several HTTP types. -// Temporarily allow `IntoIter::into_iter()` before Rust 2021 transition. -#![allow(deprecated)] - use smallvec::{Array, SmallVec}; use state::Storage; @@ -66,14 +63,14 @@ impl IntoCollection for &[T] { impl IntoCollection for [T; N] { #[inline(always)] fn into_collection>(self) -> SmallVec { - std::array::IntoIter::new(self).collect() + self.into_iter().collect() } #[inline] fn mapped>(self, f: F) -> SmallVec where F: FnMut(T) -> U { - std::array::IntoIter::new(self).map(f).collect() + self.into_iter().map(f).collect() } } diff --git a/core/http/src/uri/uri.rs b/core/http/src/uri/uri.rs index b0e033bb..0a8fef86 100644 --- a/core/http/src/uri/uri.rs +++ b/core/http/src/uri/uri.rs @@ -1,5 +1,4 @@ use std::fmt::{self, Display}; -use std::convert::TryFrom; use std::borrow::Cow; use crate::ext::IntoOwned; diff --git a/core/lib/src/form/validate.rs b/core/lib/src/form/validate.rs index 6966c2bc..c89af4e6 100644 --- a/core/lib/src/form/validate.rs +++ b/core/lib/src/form/validate.rs @@ -79,7 +79,6 @@ //! ``` use std::borrow::Cow; -use std::convert::TryInto; use std::ops::{RangeBounds, Bound}; use std::fmt::Debug; diff --git a/core/lib/src/local/asynchronous/client.rs b/core/lib/src/local/asynchronous/client.rs index a48350ae..a084dd9a 100644 --- a/core/lib/src/local/asynchronous/client.rs +++ b/core/lib/src/local/asynchronous/client.rs @@ -1,5 +1,4 @@ use std::fmt; -use std::convert::TryInto; use parking_lot::RwLock; diff --git a/core/lib/src/local/asynchronous/request.rs b/core/lib/src/local/asynchronous/request.rs index 0a71c997..99447253 100644 --- a/core/lib/src/local/asynchronous/request.rs +++ b/core/lib/src/local/asynchronous/request.rs @@ -1,5 +1,4 @@ use std::fmt; -use std::convert::TryInto; use crate::{Request, Data}; use crate::http::{Status, Method}; diff --git a/core/lib/src/local/blocking/client.rs b/core/lib/src/local/blocking/client.rs index aca6ac7d..ea7bef9b 100644 --- a/core/lib/src/local/blocking/client.rs +++ b/core/lib/src/local/blocking/client.rs @@ -1,6 +1,5 @@ use std::fmt; use std::cell::RefCell; -use std::convert::TryInto; use crate::{Rocket, Phase, Orbit, Error}; use crate::local::{asynchronous, blocking::{LocalRequest, LocalResponse}}; diff --git a/core/lib/src/local/blocking/request.rs b/core/lib/src/local/blocking/request.rs index 004103db..db2f4944 100644 --- a/core/lib/src/local/blocking/request.rs +++ b/core/lib/src/local/blocking/request.rs @@ -1,5 +1,4 @@ use std::fmt; -use std::convert::TryInto; use crate::{Request, http::Method, local::asynchronous}; use crate::http::uri::Origin; diff --git a/core/lib/src/response/redirect.rs b/core/lib/src/response/redirect.rs index efd31d76..f685fe1b 100644 --- a/core/lib/src/response/redirect.rs +++ b/core/lib/src/response/redirect.rs @@ -1,5 +1,3 @@ -use std::convert::TryInto; - use crate::request::Request; use crate::response::{self, Response, Responder}; use crate::http::uri::Reference; diff --git a/core/lib/src/response/stream/sse.rs b/core/lib/src/response/stream/sse.rs index d13f0937..cce8a273 100644 --- a/core/lib/src/response/stream/sse.rs +++ b/core/lib/src/response/stream/sse.rs @@ -1,7 +1,3 @@ -// Temporarily allow `IntoIter::into_iter()` before Rust 2021 transition. -#![allow(deprecated)] - -use std::array; use std::borrow::Cow; use tokio::io::AsyncRead; @@ -340,7 +336,7 @@ impl Event { Some(RawLinedEvent::raw("")), ]; - stream::iter(array::IntoIter::new(events)).filter_map(ready) + stream::iter(events).filter_map(ready) } } diff --git a/core/lib/src/rocket.rs b/core/lib/src/rocket.rs index f0acef05..2af40a76 100644 --- a/core/lib/src/rocket.rs +++ b/core/lib/src/rocket.rs @@ -1,6 +1,5 @@ use std::fmt; use std::ops::{Deref, DerefMut}; -use std::convert::TryInto; use std::net::SocketAddr; use yansi::Paint;