Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update getrandom to v0.3 in examples. #302

Merged
merged 2 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/hello_world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ log = "0.4"
proxy-wasm = { path = "../../" }

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

[profile.release]
lto = true
Expand Down
4 changes: 2 additions & 2 deletions examples/hello_world/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use proxy_wasm::types::*;
use std::time::Duration;

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

proxy_wasm::main! {{
proxy_wasm::set_log_level(LogLevel::Trace);
Expand All @@ -47,7 +47,7 @@ impl RootContext for HelloWorld {
} else {
let now: DateTime<Utc> = Utc::now();
let mut buf = [0u8; 1];
getrandom(&mut buf).unwrap();
fill(&mut buf).unwrap();
info!("It's {}, your lucky number is {}.", now, buf[0]);
}
}
Expand Down
Loading