diff --git a/Cargo.lock b/Cargo.lock index c2292b737..a4454b99b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1016,7 +1016,7 @@ dependencies = [ "nix 0.31.1", "oneshot", "portable-pty", - "rand 0.8.5", + "rand 0.9.2", "ratatui 0.30.0", "ratatui-image", "time", diff --git a/tui/Cargo.toml b/tui/Cargo.toml index badb0c239..b29f5d284 100644 --- a/tui/Cargo.toml +++ b/tui/Cargo.toml @@ -30,7 +30,7 @@ linutil_core = { version = "26.3.5", path = "../core" } nix = { version = "0.31.1", features = ["user"] } oneshot = { version = "0.1.12", features = ["std"], default-features = false } portable-pty = "0.9.0" -rand = { version = "0.8.5", optional = true } +rand = { version = "0.9.2", optional = true } ratatui = { version = "0.30.0", features = ["crossterm"], default-features = false } ratatui-image = { version = "10.0.5", default-features = false, features = ["crossterm", "image-defaults"] } time = { version = "0.3.47", features = ["formatting", "local-offset", "macros"], default-features = false } diff --git a/tui/src/tips.rs b/tui/src/tips.rs index 17341c794..3125fd281 100644 --- a/tui/src/tips.rs +++ b/tui/src/tips.rs @@ -8,6 +8,6 @@ pub fn get_random_tip() -> &'static str { return ""; } - let random_index = rand::thread_rng().gen_range(0..tips.len()); + let random_index = rand::rng().random_range(0..tips.len()); tips[random_index] }