Skip to content

Commit 52107d3

Browse files
authored
Fix rand API after recent update (#1760)
No functional change intended
1 parent 1444b3e commit 52107d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/sealed_file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ impl SealedFile {
5353
/// Create a `[SealedFile]` with the given binary data.
5454
#[cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "android")))]
5555
pub fn with_data(name: &CStr, data: &[u8]) -> Result<Self, std::io::Error> {
56-
use rand::{distributions::Alphanumeric, Rng};
56+
use rand::{distr::Alphanumeric, Rng};
5757
use rustix::{
5858
io::Errno,
5959
shm::{self, Mode},
6060
};
6161

62-
let mut rng = rand::thread_rng();
62+
let mut rng = rand::rng();
6363

6464
// `memfd_create` isn't available. Instead, try `shm_open` with a randomized name, and
6565
// loop a couple times if it exists.

0 commit comments

Comments
 (0)