Skip to content

Commit b8542e0

Browse files
committed
Update getrandom to v0.3 in examples.
Signed-off-by: Piotr Sikora <[email protected]>
1 parent ae38c0f commit b8542e0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/hello_world/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ log = "0.4"
1717
proxy-wasm = { path = "../../" }
1818

1919
[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies]
20-
getrandom = "0.2"
20+
getrandom = "0.3"
2121

2222
[profile.release]
2323
lto = true

examples/hello_world/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use proxy_wasm::types::*;
2020
use std::time::Duration;
2121

2222
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
23-
use getrandom::getrandom;
23+
use getrandom::fill;
2424

2525
proxy_wasm::main! {{
2626
proxy_wasm::set_log_level(LogLevel::Trace);
@@ -47,7 +47,7 @@ impl RootContext for HelloWorld {
4747
} else {
4848
let now: DateTime<Utc> = Utc::now();
4949
let mut buf = [0u8; 1];
50-
getrandom(&mut buf).unwrap();
50+
fill(&mut buf).unwrap();
5151
info!("It's {}, your lucky number is {}.", now, buf[0]);
5252
}
5353
}

0 commit comments

Comments
 (0)