Remove explicit TryFrom, TryInto imports (#1099)

This commit is contained in:
Jonas Platte
2022-06-17 18:36:49 +00:00
committed by GitHub
parent 2f64064650
commit 1812c4dfe8
6 changed files with 5 additions and 12 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
use super::{IntoResponse, IntoResponseParts, Response, ResponseParts, TryIntoHeaderError};
use http::header::{HeaderName, HeaderValue};
use std::{convert::TryInto, fmt};
use std::fmt;
/// Append headers to a response.
///
+1 -1
View File
@@ -11,7 +11,7 @@ use http_body::{
};
use std::{
borrow::Cow,
convert::{Infallible, TryInto},
convert::Infallible,
fmt,
pin::Pin,
task::{Context, Poll},
@@ -3,10 +3,7 @@ use http::{
header::{HeaderMap, HeaderName, HeaderValue},
Extensions, StatusCode,
};
use std::{
convert::{Infallible, TryInto},
fmt,
};
use std::{convert::Infallible, fmt};
/// Trait for adding headers and extensions to a response.
///
-1
View File
@@ -1,6 +1,5 @@
use axum_core::response::{IntoResponse, Response};
use http::{header::LOCATION, HeaderValue, StatusCode};
use std::convert::TryFrom;
/// Response that redirects the request to another location.
///
+1 -4
View File
@@ -5,10 +5,7 @@ use http::{
Request, StatusCode,
};
use hyper::{Body, Server};
use std::{
convert::TryFrom,
net::{SocketAddr, TcpListener},
};
use std::net::{SocketAddr, TcpListener};
use tower::make::Shared;
use tower_service::Service;
+1 -1
View File
@@ -14,7 +14,7 @@ use axum::{
Router,
};
use hyper::{client::HttpConnector, Body};
use std::{convert::TryFrom, net::SocketAddr};
use std::net::SocketAddr;
type Client = hyper::client::Client<HttpConnector, Body>;