@@ -553,7 +553,6 @@ impl Socks5Datagram {
553
553
554
554
#[ cfg( test) ]
555
555
mod test {
556
- use std:: error:: Error ;
557
556
use std:: io:: { Read , Write } ;
558
557
use std:: net:: { TcpStream , ToSocketAddrs , UdpSocket } ;
559
558
@@ -745,7 +744,7 @@ mod test {
745
744
. unwrap_err ( ) ;
746
745
747
746
assert_eq ! ( err. kind( ) , io:: ErrorKind :: PermissionDenied ) ;
748
- assert_eq ! ( err. description ( ) , "password authentication failed" ) ;
747
+ assert_eq ! ( err. to_string ( ) , "password authentication failed" ) ;
749
748
}
750
749
751
750
#[ test]
@@ -755,7 +754,7 @@ mod test {
755
754
let err = Socks5Stream :: connect ( SOCKS_PROXY_PASSWD_ONLY , addr, None ) . unwrap_err ( ) ;
756
755
757
756
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" ) ;
759
758
}
760
759
761
760
#[ test]
@@ -772,7 +771,7 @@ mod test {
772
771
)
773
772
. unwrap_err ( ) ;
774
773
assert_eq ! ( err. kind( ) , io:: ErrorKind :: PermissionDenied ) ;
775
- assert_eq ! ( err. description ( ) , "password authentication failed" ) ;
774
+ assert_eq ! ( err. to_string ( ) , "password authentication failed" ) ;
776
775
777
776
let err = Socks5Stream :: connect_with_password (
778
777
SOCKS_PROXY_PASSWD_ONLY ,
@@ -783,7 +782,7 @@ mod test {
783
782
)
784
783
. unwrap_err ( ) ;
785
784
assert_eq ! ( err. kind( ) , io:: ErrorKind :: PermissionDenied ) ;
786
- assert_eq ! ( err. description ( ) , "password authentication failed" ) ;
785
+ assert_eq ! ( err. to_string ( ) , "password authentication failed" ) ;
787
786
788
787
let err = Socks5Stream :: connect_with_password (
789
788
SOCKS_PROXY_PASSWD_ONLY ,
@@ -794,7 +793,7 @@ mod test {
794
793
)
795
794
. unwrap_err ( ) ;
796
795
assert_eq ! ( err. kind( ) , io:: ErrorKind :: InvalidInput ) ;
797
- assert_eq ! ( err. description ( ) , "invalid username" ) ;
796
+ assert_eq ! ( err. to_string ( ) , "invalid username" ) ;
798
797
799
798
let err = Socks5Stream :: connect_with_password (
800
799
SOCKS_PROXY_PASSWD_ONLY ,
@@ -805,7 +804,7 @@ mod test {
805
804
)
806
805
. unwrap_err ( ) ;
807
806
assert_eq ! ( err. kind( ) , io:: ErrorKind :: InvalidInput ) ;
808
- assert_eq ! ( err. description ( ) , "invalid username" ) ;
807
+ assert_eq ! ( err. to_string ( ) , "invalid username" ) ;
809
808
810
809
let err = Socks5Stream :: connect_with_password (
811
810
SOCKS_PROXY_PASSWD_ONLY ,
@@ -816,7 +815,7 @@ mod test {
816
815
)
817
816
. unwrap_err ( ) ;
818
817
assert_eq ! ( err. kind( ) , io:: ErrorKind :: InvalidInput ) ;
819
- assert_eq ! ( err. description ( ) , "invalid password" ) ;
818
+ assert_eq ! ( err. to_string ( ) , "invalid password" ) ;
820
819
821
820
let err = Socks5Stream :: connect_with_password (
822
821
SOCKS_PROXY_PASSWD_ONLY ,
@@ -827,7 +826,7 @@ mod test {
827
826
)
828
827
. unwrap_err ( ) ;
829
828
assert_eq ! ( err. kind( ) , io:: ErrorKind :: InvalidInput ) ;
830
- assert_eq ! ( err. description ( ) , "invalid password" ) ;
829
+ assert_eq ! ( err. to_string ( ) , "invalid password" ) ;
831
830
}
832
831
833
832
fn string_of_size ( size : usize ) -> String {
0 commit comments