Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 5 additions & 64 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 @@ -78,7 +78,7 @@ hyper-tls = { version = "0.6", features = ["alpn"], optional = true }
hyper-util = { version = "0.1", features = ["client", "client-legacy", "http1", "http2", "tokio"] }
libc = "0.2"
native-tls = { version = "0.2", features = ["alpn"], optional = true }
rand = "0.8"
rand = "0.10"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"], optional = true }
rustls-native-certs = { version = "0.8", optional = true }
rustls-pki-types = { version = "1", optional = true }
Expand Down
60 changes: 34 additions & 26 deletions fuzz/Cargo.lock

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

4 changes: 1 addition & 3 deletions src/defs/bytes_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use std::sync::Mutex;
use std::time::Instant;

use rand::RngCore;

/// Tracks total bytes transferred and derives the average transfer rate.
///
/// The total is a mutex rather than an `AtomicU64` because 32-bit targets such
Expand Down Expand Up @@ -110,6 +108,6 @@ impl Default for BytesCounter {
/// faster for bulk data and the payload only needs to be incompressible.
pub fn random_data(length: usize) -> Vec<u8> {
let mut data = vec![0u8; length];
rand::thread_rng().fill_bytes(&mut data);
rand::fill(&mut data[..]);
data
}
6 changes: 3 additions & 3 deletions src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::net::IpAddr;
use std::time::{Duration, Instant};

use bytes::Bytes;
use rand::Rng;
use rand::RngExt;
use url::Url;

use crate::cli::Cli;
Expand Down Expand Up @@ -438,9 +438,9 @@ async fn send_telemetry(
/// Builds a `multipart/form-data` body, returning the content type and bytes.
fn multipart_form(fields: &[(&str, &str)]) -> (String, Bytes) {
let boundary: String = {
let mut rng = rand::thread_rng();
let mut rng = rand::rng();
(0..60)
.map(|_| char::from(b'a' + rng.gen_range(0..26)))
.map(|_| char::from(b'a' + rng.random_range(0..26)))
.collect()
};

Expand Down
Loading