mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +02:00
Change Connected::connect_info to return Self (#396)
I've been thinking that having an associated type probably isn't necessary. I imagine most users are either using `SocketAddr` to the remote connection IP, or writing their own connection struct.
This commit is contained in:
@@ -156,9 +156,7 @@ struct UdsConnectInfo {
|
||||
}
|
||||
|
||||
impl connect_info::Connected<&UnixStream> for UdsConnectInfo {
|
||||
type ConnectInfo = Self;
|
||||
|
||||
fn connect_info(target: &UnixStream) -> Self::ConnectInfo {
|
||||
fn connect_info(target: &UnixStream) -> Self {
|
||||
let peer_addr = target.peer_addr().unwrap();
|
||||
let peer_cred = target.peer_cred().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user