diff --git a/Cargo.lock b/Cargo.lock index b48695b..da370a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -365,17 +365,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "getrandom" version = "0.4.3" @@ -403,7 +392,7 @@ version = "1.0.0" dependencies = [ "clap", "ctrlc", - "getrandom 0.2.17", + "getrandom", "guara-core", "rpassword", "serde_json", @@ -952,7 +941,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom", "once_cell", "rustix", "windows-sys 0.61.2", @@ -1046,12 +1035,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - [[package]] name = "weezl" version = "0.1.12" diff --git a/crates/guara-cli/Cargo.toml b/crates/guara-cli/Cargo.toml index 4ae170f..96788b2 100644 --- a/crates/guara-cli/Cargo.toml +++ b/crates/guara-cli/Cargo.toml @@ -16,6 +16,6 @@ guara-core = { path = "../guara-core" } clap = { version = "4", features = ["derive"] } serde_json = "1" tiny_http = "0.12" -getrandom = "0.2" +getrandom = "0.4" ctrlc = "3" rpassword = "7" diff --git a/crates/guara-cli/src/serve.rs b/crates/guara-cli/src/serve.rs index 8afa5a7..c73e9a6 100644 --- a/crates/guara-cli/src/serve.rs +++ b/crates/guara-cli/src/serve.rs @@ -26,7 +26,7 @@ pub fn run(port: u16, open: bool) -> Result<(), String> { .map(|a| a.port()) .unwrap_or(port); let mut tok = [0u8; 16]; - getrandom::getrandom(&mut tok).map_err(|e| e.to_string())?; + getrandom::fill(&mut tok).map_err(|e| e.to_string())?; let token: Arc = tok .iter() .map(|b| format!("{b:02x}"))