Skip to content

Commit

Permalink
Increase rand dependency lower bound to 0.9.0
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Feb 18, 2025
1 parent 900ac34 commit 31ba188
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ nix = {version = "0.29.0", features=["fs", "ioctl", "mount"]}
env_logger="0.11.0"
semver = "1.0.0"
serde = "1.0.60"
rand = "0.8.0"
rand = "0.9.0"
retry = {version = "2.0.0", default-features=false}
log = "0.4.14"
once_cell = "1.19.0"
Expand Down
2 changes: 1 addition & 1 deletion src/core/dm_udev_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub mod sync_semaphore {
fn generate_semaphore_cookie() -> OperationResult<(u32, i32), std::io::Error> {
let mut base_cookie = 0u16;
while base_cookie == 0 {
base_cookie = rand::thread_rng().gen::<u16>();
base_cookie = rand::rng().random::<u16>();
}
let cookie = dmi::DM_COOKIE_MAGIC << dmi::DM_UDEV_FLAGS_SHIFT | base_cookie as u32;
match semget(cookie as i32, 1, COOKIE_MODE | IPC_CREAT | IPC_EXCL) {
Expand Down

0 comments on commit 31ba188

Please sign in to comment.