File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ impl fmt::Display for SocketAddrV4 {
591591 if f. precision ( ) . is_none ( ) && f. width ( ) . is_none ( ) {
592592 write ! ( f, "{}:{}" , self . ip( ) , self . port( ) )
593593 } else {
594- const LONGEST_IPV4_SOCKET_ADDR : & str = "255.255.255.255:65536 " ;
594+ const LONGEST_IPV4_SOCKET_ADDR : & str = "255.255.255.255:65535 " ;
595595
596596 let mut buf = DisplayBuffer :: < { LONGEST_IPV4_SOCKET_ADDR . len ( ) } > :: new ( ) ;
597597 // Buffer is long enough for the longest possible IPv4 socket address, so this should never fail.
@@ -621,7 +621,7 @@ impl fmt::Display for SocketAddrV6 {
621621 }
622622 } else {
623623 const LONGEST_IPV6_SOCKET_ADDR : & str =
624- "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff%4294967296]:65536 " ;
624+ "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff%4294967295]:65535 " ;
625625
626626 let mut buf = DisplayBuffer :: < { LONGEST_IPV6_SOCKET_ADDR . len ( ) } > :: new ( ) ;
627627 match self . scope_id ( ) {
You can’t perform that action at this time.
0 commit comments