File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ const CHARSET: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\
1515///
1616/// A randomly generated password as a `String`.
1717pub fn generate_password ( length : usize ) -> String {
18- let mut rng = rand:: thread_rng ( ) ;
18+ let mut rng = rand:: rng ( ) ;
1919
2020 let password: String = ( 0 ..length)
2121 . map ( |_| {
22- let idx = rng. gen_range ( 0 ..CHARSET . len ( ) ) ;
22+ let idx = rng. random_range ( 0 ..CHARSET . len ( ) ) ;
2323 CHARSET [ idx] as char
2424 } )
2525 . collect ( ) ;
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ pub enum ExitNodeProvisionerSpec {
201201}
202202
203203impl ExitNodeProvisionerSpec {
204- pub fn get_inner ( self ) -> Box < ( dyn Provisioner + Send + Sync ) > {
204+ pub fn get_inner ( self ) -> Box < dyn Provisioner + Send + Sync > {
205205 // Can we somehow not have to match on this?
206206 match self {
207207 ExitNodeProvisionerSpec :: DigitalOcean ( a) => Box :: new ( a) ,
You can’t perform that action at this time.
0 commit comments