Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove explicit TryFrom, TryInto imports #1099

Merged
merged 1 commit into from Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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