@@ -553,7 +553,6 @@ impl Socks5Datagram {
553553
554554#[ cfg( test) ]
555555mod test {
556- use std:: error:: Error ;
557556 use std:: io:: { Read , Write } ;
558557 use std:: net:: { TcpStream , ToSocketAddrs , UdpSocket } ;
559558
@@ -745,7 +744,7 @@ mod test {
745744 . unwrap_err ( ) ;
746745
747746 assert_eq ! ( err. kind( ) , io:: ErrorKind :: PermissionDenied ) ;
748- assert_eq ! ( err. description ( ) , "password authentication failed" ) ;
747+ assert_eq ! ( err. to_string ( ) , "password authentication failed" ) ;
749748 }
750749
751750 #[ test]
@@ -755,7 +754,7 @@ mod test {
755754 let err = Socks5Stream :: connect ( SOCKS_PROXY_PASSWD_ONLY , addr, None ) . unwrap_err ( ) ;
756755
757756 assert_eq ! ( err. kind( ) , io:: ErrorKind :: Other ) ;
758- assert_eq ! ( err. description ( ) , "no acceptable auth methods" ) ;
757+ assert_eq ! ( err. to_string ( ) , "no acceptable auth methods" ) ;
759758 }
760759
761760 #[ test]
@@ -772,7 +771,7 @@ mod test {
772771 )
773772 . unwrap_err ( ) ;
774773 assert_eq ! ( err. kind( ) , io:: ErrorKind :: PermissionDenied ) ;
775- assert_eq ! ( err. description ( ) , "password authentication failed" ) ;
774+ assert_eq ! ( err. to_string ( ) , "password authentication failed" ) ;
776775
777776 let err = Socks5Stream :: connect_with_password (
778777 SOCKS_PROXY_PASSWD_ONLY ,
@@ -783,7 +782,7 @@ mod test {
783782 )
784783 . unwrap_err ( ) ;
785784 assert_eq ! ( err. kind( ) , io:: ErrorKind :: PermissionDenied ) ;
786- assert_eq ! ( err. description ( ) , "password authentication failed" ) ;
785+ assert_eq ! ( err. to_string ( ) , "password authentication failed" ) ;
787786
788787 let err = Socks5Stream :: connect_with_password (
789788 SOCKS_PROXY_PASSWD_ONLY ,
@@ -794,7 +793,7 @@ mod test {
794793 )
795794 . unwrap_err ( ) ;
796795 assert_eq ! ( err. kind( ) , io:: ErrorKind :: InvalidInput ) ;
797- assert_eq ! ( err. description ( ) , "invalid username" ) ;
796+ assert_eq ! ( err. to_string ( ) , "invalid username" ) ;
798797
799798 let err = Socks5Stream :: connect_with_password (
800799 SOCKS_PROXY_PASSWD_ONLY ,
@@ -805,7 +804,7 @@ mod test {
805804 )
806805 . unwrap_err ( ) ;
807806 assert_eq ! ( err. kind( ) , io:: ErrorKind :: InvalidInput ) ;
808- assert_eq ! ( err. description ( ) , "invalid username" ) ;
807+ assert_eq ! ( err. to_string ( ) , "invalid username" ) ;
809808
810809 let err = Socks5Stream :: connect_with_password (
811810 SOCKS_PROXY_PASSWD_ONLY ,
@@ -816,7 +815,7 @@ mod test {
816815 )
817816 . unwrap_err ( ) ;
818817 assert_eq ! ( err. kind( ) , io:: ErrorKind :: InvalidInput ) ;
819- assert_eq ! ( err. description ( ) , "invalid password" ) ;
818+ assert_eq ! ( err. to_string ( ) , "invalid password" ) ;
820819
821820 let err = Socks5Stream :: connect_with_password (
822821 SOCKS_PROXY_PASSWD_ONLY ,
@@ -827,7 +826,7 @@ mod test {
827826 )
828827 . unwrap_err ( ) ;
829828 assert_eq ! ( err. kind( ) , io:: ErrorKind :: InvalidInput ) ;
830- assert_eq ! ( err. description ( ) , "invalid password" ) ;
829+ assert_eq ! ( err. to_string ( ) , "invalid password" ) ;
831830 }
832831
833832 fn string_of_size ( size : usize ) -> String {
0 commit comments