Skip to content

Commit

Permalink
fix(deps): update rand
Browse files Browse the repository at this point in the history
  • Loading branch information
TeddyHuang-00 committed Feb 7, 2025
1 parent b85ea48 commit b125516
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 16 deletions.
71 changes: 61 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ humantime = "2.1.0"
indicatif = "0.17.8"
log = "0.4.21"
num-format = "0.4.4"
rand = "0.8.5"
rand = "0.9.0"
shellexpand = "3.1.0"
simple_logger = "5.0.0"
size = "0.5.0"
Expand Down
10 changes: 5 additions & 5 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use std::{
};

use indicatif::{ProgressBar, ProgressState, ProgressStyle};
use log::{debug, info, log_enabled, trace, warn, Level};
use log::{Level, debug, info, log_enabled, trace, warn};
use rand::{
distributions::{Distribution, Uniform},
thread_rng,
distr::{Distribution, Uniform},
rng,
};
use ssh2::Session;

Expand Down Expand Up @@ -157,9 +157,9 @@ fn run_upload_test(
.map_err(|e| e.to_string())?;
// Generate random data to upload
trace!("Generating random data");
let dist = Uniform::from(0..128 as u8);
let dist = Uniform::try_from(0..128_u8).unwrap();
let buffer = dist
.sample_iter(thread_rng())
.sample_iter(rng())
.take(size as usize)
.map(|v| ((v & 0x3f) + 32) as char)
.collect::<String>();
Expand Down

0 comments on commit b125516

Please sign in to comment.