From 1812c4dfe8be87534986861f093bd5a59382dfb2 Mon Sep 17 00:00:00 2001
From: Jonas Platte <jplatte+git@posteo.de>
Date: Fri, 17 Jun 2022 20:36:49 +0200
Subject: [PATCH] Remove explicit TryFrom, TryInto imports (#1099)

---
 axum-core/src/response/append_headers.rs      | 2 +-
 axum-core/src/response/into_response.rs       | 2 +-
 axum-core/src/response/into_response_parts.rs | 5 +----
 axum/src/response/redirect.rs                 | 1 -
 axum/src/test_helpers/test_client.rs          | 5 +----
 examples/reverse-proxy/src/main.rs            | 2 +-
 6 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/axum-core/src/response/append_headers.rs b/axum-core/src/response/append_headers.rs
index 0eb7c14b..d777332f 100644
--- a/axum-core/src/response/append_headers.rs
+++ b/axum-core/src/response/append_headers.rs
@@ -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.
 ///
diff --git a/axum-core/src/response/into_response.rs b/axum-core/src/response/into_response.rs
index 336f2adb..1ad461f8 100644
--- a/axum-core/src/response/into_response.rs
+++ b/axum-core/src/response/into_response.rs
@@ -11,7 +11,7 @@ use http_body::{
 };
 use std::{
     borrow::Cow,
-    convert::{Infallible, TryInto},
+    convert::Infallible,
     fmt,
     pin::Pin,
     task::{Context, Poll},
diff --git a/axum-core/src/response/into_response_parts.rs b/axum-core/src/response/into_response_parts.rs
index 00c2763d..831e35cb 100644
--- a/axum-core/src/response/into_response_parts.rs
+++ b/axum-core/src/response/into_response_parts.rs
@@ -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.
 ///
diff --git a/axum/src/response/redirect.rs b/axum/src/response/redirect.rs
index a994db7b..e11389e8 100644
--- a/axum/src/response/redirect.rs
+++ b/axum/src/response/redirect.rs
@@ -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.
 ///
diff --git a/axum/src/test_helpers/test_client.rs b/axum/src/test_helpers/test_client.rs
index 34791b45..d52c61a6 100644
--- a/axum/src/test_helpers/test_client.rs
+++ b/axum/src/test_helpers/test_client.rs
@@ -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;
 
diff --git a/examples/reverse-proxy/src/main.rs b/examples/reverse-proxy/src/main.rs
index 849af0b3..a9d2a5c7 100644
--- a/examples/reverse-proxy/src/main.rs
+++ b/examples/reverse-proxy/src/main.rs
@@ -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>;