Skip to content

Commit

Permalink
Remove explicit TryFrom, TryInto imports (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Jun 17, 2022
1 parent 2f64064 commit 1812c4d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion 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.
///
Expand Down
2 changes: 1 addition & 1 deletion axum-core/src/response/into_response.rs
Expand Up @@ -11,7 +11,7 @@ use http_body::{
};
use std::{
borrow::Cow,
convert::{Infallible, TryInto},
convert::Infallible,
fmt,
pin::Pin,
task::{Context, Poll},
Expand Down
5 changes: 1 addition & 4 deletions axum-core/src/response/into_response_parts.rs
Expand Up @@ -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.
///
Expand Down
1 change: 0 additions & 1 deletion 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.
///
Expand Down
5 changes: 1 addition & 4 deletions axum/src/test_helpers/test_client.rs
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion examples/reverse-proxy/src/main.rs
Expand Up @@ -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>;

Expand Down

0 comments on commit 1812c4d

Please sign in to comment.