mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
Remove impl Connected<&AddrStream> for SocketAddr (#1954)
This commit is contained in:
@@ -191,7 +191,6 @@ allowed = [
|
||||
"futures_util",
|
||||
"http",
|
||||
"http_body",
|
||||
"hyper",
|
||||
"serde",
|
||||
"tokio",
|
||||
"tower_layer",
|
||||
|
||||
@@ -8,7 +8,6 @@ use super::{Extension, FromRequestParts};
|
||||
use crate::{middleware::AddExtension, serve::IncomingStream};
|
||||
use async_trait::async_trait;
|
||||
use http::request::Parts;
|
||||
use hyper::server::conn::AddrStream;
|
||||
use std::{
|
||||
convert::Infallible,
|
||||
fmt,
|
||||
@@ -83,12 +82,6 @@ pub trait Connected<T>: Clone + Send + Sync + 'static {
|
||||
fn connect_info(target: T) -> Self;
|
||||
}
|
||||
|
||||
impl Connected<&AddrStream> for SocketAddr {
|
||||
fn connect_info(target: &AddrStream) -> Self {
|
||||
target.remote_addr()
|
||||
}
|
||||
}
|
||||
|
||||
impl Connected<IncomingStream<'_>> for SocketAddr {
|
||||
fn connect_info(target: IncomingStream<'_>) -> Self {
|
||||
target.remote_addr()
|
||||
|
||||
Reference in New Issue
Block a user