diff --git a/Cargo.lock b/Cargo.lock index 87b2a89c1..b8feaa44d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -954,6 +954,18 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71393ecc86efbf00e4ca13953979ba8b94cfe549a4b74cc26d8b62f4d8feac2b" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + [[package]] name = "gio" version = "0.18.4" @@ -3207,6 +3219,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -4091,6 +4112,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -4114,7 +4144,7 @@ dependencies = [ "dpi", "dunce", "gdkx11", - "getrandom 0.2.15", + "getrandom 0.3.0", "gtk", "html5ever", "http", diff --git a/Cargo.toml b/Cargo.toml index 362f4b927..7590c1212 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -198,7 +198,7 @@ pollster = "0.4.0" tao = "0.31" wgpu = "23" winit = "0.30" -getrandom = "0.2" +getrandom = "0.3" http-range = "0.1" percent-encoding = "2.3" diff --git a/examples/streaming.rs b/examples/streaming.rs index 3c313a8ad..5c6f59ee9 100644 --- a/examples/streaming.rs +++ b/examples/streaming.rs @@ -251,7 +251,7 @@ fn stream_protocol( fn random_boundary() -> String { let mut x = [0_u8; 30]; - getrandom::getrandom(&mut x).expect("failed to get random bytes"); + getrandom::fill(&mut x).expect("failed to get random bytes"); (x[..]) .iter() .map(|&x| format!("{x:x}"))