Skip to content

Commit 779e4a4

Browse files
committed
update rand funcs, clean up lint errors
1 parent afbed44 commit 779e4a4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/cloud/pwgen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ const CHARSET: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\
1515
///
1616
/// A randomly generated password as a `String`.
1717
pub 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();

src/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub enum ExitNodeProvisionerSpec {
201201
}
202202

203203
impl 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),

0 commit comments

Comments
 (0)