mirror of
https://github.com/tokio-rs/axum.git
synced 2025-03-26 00:27:01 +01:00
Remove explicit TryFrom, TryInto imports (#1099)
This commit is contained in:
parent
2f64064650
commit
1812c4dfe8
6 changed files with 5 additions and 12 deletions
axum-core/src/response
axum/src
examples/reverse-proxy/src
|
@ -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.
|
||||
///
|
||||
|
|
|
@ -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,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.
|
||||
///
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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>;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue