@@ -2781,11 +2781,11 @@ impl fmt::Display for Config {
27812781 let local = & local_instance. config ;
27822782 if let Some ( ref a) = local. addr {
27832783 jconf. local_address = Some ( match a {
2784- ServerAddr :: SocketAddr ( ref sa) => sa. ip ( ) . to_string ( ) ,
2785- ServerAddr :: DomainName ( ref dm, ..) => dm. to_string ( ) ,
2784+ ServerAddr :: SocketAddr ( sa) => sa. ip ( ) . to_string ( ) ,
2785+ ServerAddr :: DomainName ( dm, ..) => dm. to_string ( ) ,
27862786 } ) ;
27872787 jconf. local_port = Some ( match a {
2788- ServerAddr :: SocketAddr ( ref sa) => sa. port ( ) ,
2788+ ServerAddr :: SocketAddr ( sa) => sa. port ( ) ,
27892789 ServerAddr :: DomainName ( .., port) => * port,
27902790 } ) ;
27912791 }
@@ -2811,11 +2811,11 @@ impl fmt::Display for Config {
28112811
28122812 let jlocal = SSLocalExtConfig {
28132813 local_address : local. addr . as_ref ( ) . map ( |a| match a {
2814- ServerAddr :: SocketAddr ( ref sa) => sa. ip ( ) . to_string ( ) ,
2815- ServerAddr :: DomainName ( ref dm, ..) => dm. to_string ( ) ,
2814+ ServerAddr :: SocketAddr ( sa) => sa. ip ( ) . to_string ( ) ,
2815+ ServerAddr :: DomainName ( dm, ..) => dm. to_string ( ) ,
28162816 } ) ,
28172817 local_port : local. addr . as_ref ( ) . map ( |a| match a {
2818- ServerAddr :: SocketAddr ( ref sa) => sa. port ( ) ,
2818+ ServerAddr :: SocketAddr ( sa) => sa. port ( ) ,
28192819 ServerAddr :: DomainName ( .., port) => * port,
28202820 } ) ,
28212821 disabled : None ,
@@ -2853,25 +2853,25 @@ impl fmt::Display for Config {
28532853 forward_address : match local. forward_addr {
28542854 None => None ,
28552855 Some ( ref forward_addr) => match forward_addr {
2856- Address :: SocketAddress ( ref sa) => Some ( sa. ip ( ) . to_string ( ) ) ,
2857- Address :: DomainNameAddress ( ref dm, ..) => Some ( dm. to_string ( ) ) ,
2856+ Address :: SocketAddress ( sa) => Some ( sa. ip ( ) . to_string ( ) ) ,
2857+ Address :: DomainNameAddress ( dm, ..) => Some ( dm. to_string ( ) ) ,
28582858 } ,
28592859 } ,
28602860 #[ cfg( feature = "local-tunnel" ) ]
28612861 forward_port : match local. forward_addr {
28622862 None => None ,
28632863 Some ( ref forward_addr) => match forward_addr {
2864- Address :: SocketAddress ( ref sa) => Some ( sa. port ( ) ) ,
2864+ Address :: SocketAddress ( sa) => Some ( sa. port ( ) ) ,
28652865 Address :: DomainNameAddress ( .., port) => Some ( * port) ,
28662866 } ,
28672867 } ,
28682868 #[ cfg( feature = "local-dns" ) ]
28692869 local_dns_address : match local. local_dns_addr {
28702870 None => None ,
28712871 Some ( ref local_dns_addr) => match local_dns_addr {
2872- NameServerAddr :: SocketAddr ( ref sa) => Some ( sa. ip ( ) . to_string ( ) ) ,
2872+ NameServerAddr :: SocketAddr ( sa) => Some ( sa. ip ( ) . to_string ( ) ) ,
28732873 #[ cfg( unix) ]
2874- NameServerAddr :: UnixSocketAddr ( ref path) => {
2874+ NameServerAddr :: UnixSocketAddr ( path) => {
28752875 Some ( path. to_str ( ) . expect ( "path is not utf-8" ) . to_owned ( ) )
28762876 }
28772877 } ,
@@ -2880,7 +2880,7 @@ impl fmt::Display for Config {
28802880 local_dns_port : match local. local_dns_addr {
28812881 None => None ,
28822882 Some ( ref local_dns_addr) => match local_dns_addr {
2883- NameServerAddr :: SocketAddr ( ref sa) => Some ( sa. port ( ) ) ,
2883+ NameServerAddr :: SocketAddr ( sa) => Some ( sa. port ( ) ) ,
28842884 #[ cfg( unix) ]
28852885 NameServerAddr :: UnixSocketAddr ( ..) => None ,
28862886 } ,
@@ -2889,15 +2889,15 @@ impl fmt::Display for Config {
28892889 remote_dns_address : match local. remote_dns_addr {
28902890 None => None ,
28912891 Some ( ref remote_dns_addr) => match remote_dns_addr {
2892- Address :: SocketAddress ( ref sa) => Some ( sa. ip ( ) . to_string ( ) ) ,
2893- Address :: DomainNameAddress ( ref dm, ..) => Some ( dm. to_string ( ) ) ,
2892+ Address :: SocketAddress ( sa) => Some ( sa. ip ( ) . to_string ( ) ) ,
2893+ Address :: DomainNameAddress ( dm, ..) => Some ( dm. to_string ( ) ) ,
28942894 } ,
28952895 } ,
28962896 #[ cfg( feature = "local-dns" ) ]
28972897 remote_dns_port : match local. remote_dns_addr {
28982898 None => None ,
28992899 Some ( ref remote_dns_addr) => match remote_dns_addr {
2900- Address :: SocketAddress ( ref sa) => Some ( sa. port ( ) ) ,
2900+ Address :: SocketAddress ( sa) => Some ( sa. port ( ) ) ,
29012901 Address :: DomainNameAddress ( .., port) => Some ( * port) ,
29022902 } ,
29032903 } ,
0 commit comments