mirror of https://github.com/fafhrd91/actix-web
remove unnecessary Try{From,Into} imports
This commit is contained in:
parent
40d2df94ec
commit
b657aa70e1
|
@ -97,8 +97,6 @@ impl FromRequest for PathBufWrap {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::iter::FromIterator;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -104,7 +104,6 @@ impl MessageBody for BoxBody {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use static_assertions::{assert_impl_all, assert_not_impl_any};
|
||||
|
||||
use super::*;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{convert::TryFrom, io, marker::PhantomData, mem::MaybeUninit, task::Poll};
|
||||
use std::{io, marker::PhantomData, mem::MaybeUninit, task::Poll};
|
||||
|
||||
use actix_codec::Decoder;
|
||||
use bytes::{Bytes, BytesMut};
|
||||
|
|
|
@ -160,7 +160,6 @@ mod openssl {
|
|||
|
||||
#[cfg(feature = "rustls")]
|
||||
mod rustls {
|
||||
|
||||
use std::io;
|
||||
|
||||
use actix_service::ServiceFactoryExt as _;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
//! [`TryIntoHeaderPair`] trait and implementations.
|
||||
|
||||
use std::convert::TryFrom as _;
|
||||
|
||||
use super::{
|
||||
Header, HeaderName, HeaderValue, InvalidHeaderName, InvalidHeaderValue, TryIntoHeaderValue,
|
||||
};
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
//! [`TryIntoHeaderValue`] trait and implementations.
|
||||
|
||||
use std::convert::TryFrom as _;
|
||||
|
||||
use bytes::Bytes;
|
||||
use http::{header::InvalidHeaderValue, Error as HttpError, HeaderValue};
|
||||
use mime::Mime;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{convert::TryFrom, str::FromStr};
|
||||
use std::str::FromStr;
|
||||
|
||||
use derive_more::{Display, Error};
|
||||
use http::header::InvalidHeaderValue;
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
use std::{
|
||||
convert::{TryFrom, TryInto},
|
||||
fmt,
|
||||
};
|
||||
use std::fmt;
|
||||
|
||||
use derive_more::{Display, Error};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{cmp, convert::TryFrom as _, fmt, str};
|
||||
use std::{cmp, fmt, str};
|
||||
|
||||
use crate::error::ParseError;
|
||||
|
||||
|
|
|
@ -234,7 +234,6 @@ impl<P> fmt::Debug for Request<P> {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
#[test]
|
||||
fn test_basics() {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use std::cmp::min;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use bytes::{Buf, BufMut, BytesMut};
|
||||
use tracing::debug;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
extern crate tls_rustls as rustls;
|
||||
|
||||
use std::{
|
||||
convert::{Infallible, TryFrom},
|
||||
convert::Infallible,
|
||||
io::{self, BufReader, Write},
|
||||
net::{SocketAddr, TcpStream as StdTcpStream},
|
||||
sync::Arc,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
|
||||
use std::{collections::HashSet, convert::TryFrom as _};
|
||||
use std::collections::HashSet;
|
||||
|
||||
use darling::{FromDeriveInput, FromField, FromMeta};
|
||||
use parse_size::parse_size;
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
use std::{
|
||||
cell::{Cell, RefCell, RefMut},
|
||||
cmp,
|
||||
convert::TryFrom,
|
||||
fmt,
|
||||
cmp, fmt,
|
||||
marker::PhantomData,
|
||||
pin::Pin,
|
||||
rc::Rc,
|
||||
|
|
|
@ -1389,8 +1389,6 @@ mod tests {
|
|||
#[cfg(feature = "http")]
|
||||
#[test]
|
||||
fn parse_urlencoded_param() {
|
||||
use std::convert::TryFrom;
|
||||
|
||||
let re = ResourceDef::new("/user/{id}/test");
|
||||
|
||||
let mut path = Path::new("/user/2345/test");
|
||||
|
|
|
@ -65,7 +65,6 @@ impl ResourcePath for Url {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use http::Uri;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use super::*;
|
||||
use crate::{Path, ResourceDef};
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
|
||||
use std::{
|
||||
collections::VecDeque,
|
||||
convert::TryFrom,
|
||||
future::Future,
|
||||
io, mem,
|
||||
pin::Pin,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{collections::HashSet, convert::TryFrom};
|
||||
use std::collections::HashSet;
|
||||
|
||||
use actix_router::ResourceDef;
|
||||
use proc_macro::TokenStream;
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
|
||||
use std::{
|
||||
cell::{Ref, RefMut},
|
||||
convert::TryFrom,
|
||||
rc::Rc,
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//! For middleware documentation, see [`DefaultHeaders`].
|
||||
|
||||
use std::{
|
||||
convert::TryFrom,
|
||||
future::Future,
|
||||
marker::PhantomData,
|
||||
pin::Pin,
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
use std::{
|
||||
borrow::Cow,
|
||||
collections::HashSet,
|
||||
convert::TryFrom,
|
||||
env,
|
||||
fmt::{self, Display as _},
|
||||
future::Future,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use std::{
|
||||
cell::{Ref, RefMut},
|
||||
convert::TryInto,
|
||||
future::Future,
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
|
|
|
@ -359,7 +359,6 @@ where
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::*;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{convert::TryFrom, fmt, net::IpAddr, rc::Rc, time::Duration};
|
||||
use std::{fmt, net::IpAddr, rc::Rc, time::Duration};
|
||||
|
||||
use base64::prelude::*;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! HTTP client.
|
||||
|
||||
use std::{convert::TryFrom, rc::Rc, time::Duration};
|
||||
use std::{rc::Rc, time::Duration};
|
||||
|
||||
use actix_http::{error::HttpError, header::HeaderMap, Method, RequestHead, Uri};
|
||||
use actix_rt::net::TcpStream;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use std::{
|
||||
convert::TryFrom,
|
||||
future::Future,
|
||||
net::SocketAddr,
|
||||
pin::Pin,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{convert::TryFrom, fmt, net, rc::Rc, time::Duration};
|
||||
use std::{fmt, net, rc::Rc, time::Duration};
|
||||
|
||||
use base64::prelude::*;
|
||||
use bytes::Bytes;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
//! }
|
||||
//! ```
|
||||
|
||||
use std::{convert::TryFrom, fmt, net::SocketAddr, str};
|
||||
use std::{fmt, net::SocketAddr, str};
|
||||
|
||||
use base64::prelude::*;
|
||||
|
||||
|
|
Loading…
Reference in New Issue