File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ exclude = [
1616[dependencies ]
1717pnet = " ^0.35"
1818hex = " ^0.4"
19- rand = " ^0.8 "
19+ rand = " ^0.9 "
2020sha2 = " ^0.10"
2121
2222[dev-dependencies ]
23- rstest = " ~0.22 "
23+ rstest = " ~0.24 "
Original file line number Diff line number Diff line change 11pub mod error;
22
3- use rand:: { thread_rng, Rng } ;
4- use rand:: seq:: SliceRandom ;
3+ use rand:: Rng ;
54use std:: str:: FromStr ;
65use sha2:: { Sha256 , Digest } ;
76use std:: net:: { SocketAddr , TcpStream , ToSocketAddrs } ;
87use std:: io:: { Write , Read } ;
98use std:: time:: Duration ;
9+ use rand:: seq:: IndexedRandom ;
1010use crate :: error:: { DetailedError , JarmError } ;
1111
1212const ALPN_EXTENSION : & [ u8 ; 2 ] = b"\x00 \x10 " ;
@@ -762,8 +762,8 @@ impl JarmRng for TestRng { // Mocked Rng used in tests
762762
763763impl JarmRng for PseudoRng { // Real Rng used outside of tests
764764 fn random_bytes ( & self ) -> Vec < u8 > {
765- let mut rng = thread_rng ( ) ;
766- rng. gen :: < [ u8 ; 32 ] > ( ) . to_vec ( )
765+ let mut rng = rand :: rng ( ) ;
766+ rng. random :: < [ u8 ; 32 ] > ( ) . to_vec ( )
767767 }
768768
769769 fn random_grease ( & self ) -> Vec < u8 > {
@@ -785,7 +785,7 @@ impl JarmRng for PseudoRng { // Real Rng used outside of tests
785785 b"\xea \xea " . to_vec( ) ,
786786 b"\xfa \xfa " . to_vec( ) ,
787787 ] ;
788- grease_list. choose ( & mut rand:: thread_rng ( ) ) . unwrap ( ) . clone ( )
788+ grease_list. choose ( & mut rand:: rng ( ) ) . unwrap ( ) . clone ( )
789789 }
790790}
791791
You can’t perform that action at this time.
0 commit comments