File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,20 +96,20 @@ impl Response {
9696 & self . url
9797 }
9898
99- /// Get the remote address used to get this `Response`.
100- pub fn remote_addr ( & self ) -> Option < SocketAddr > {
99+ /// Get the local address used to get this `Response`.
100+ pub fn local_addr ( & self ) -> Option < SocketAddr > {
101101 self . res
102102 . extensions ( )
103103 . get :: < HttpInfo > ( )
104- . map ( |info| info . remote_addr ( ) )
104+ . map ( HttpInfo :: local_addr )
105105 }
106106
107- /// Get the local address used to get this `Response`.
108- pub fn local_addr ( & self ) -> Option < SocketAddr > {
107+ /// Get the remote address used to get this `Response`.
108+ pub fn remote_addr ( & self ) -> Option < SocketAddr > {
109109 self . res
110110 . extensions ( )
111111 . get :: < HttpInfo > ( )
112- . map ( |info| info . local_addr ( ) )
112+ . map ( HttpInfo :: remote_addr )
113113 }
114114
115115 /// Returns a reference to the associated extensions.
You can’t perform that action at this time.
0 commit comments