From 333c6dd059ab7b22c12698b825050c5fde74997c Mon Sep 17 00:00:00 2001 From: SH Weng Date: Sat, 15 Mar 2025 15:38:13 +0800 Subject: [PATCH] fix(deps): support newer version of `rand` crate Closes #186. --- fake-tcp/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fake-tcp/src/lib.rs b/fake-tcp/src/lib.rs index bf6647a..a431651 100644 --- a/fake-tcp/src/lib.rs +++ b/fake-tcp/src/lib.rs @@ -402,7 +402,7 @@ impl Stack { /// Connects to the remote end. `None` returned means /// the connection attempt failed. pub async fn connect(&mut self, addr: SocketAddr) -> Option { - let mut rng = SmallRng::from_entropy(); + let mut rng = SmallRng::from_os_rng(); for local_port in rng.gen_range(32768..=60999)..=60999 { let local_addr = SocketAddr::new( if addr.is_ipv4() {