File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ log = "0.4"
1717proxy-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 ]
2323lto = true
Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ use proxy_wasm::traits::*;
1919use proxy_wasm:: types:: * ;
2020use std:: time:: Duration ;
2121
22- #[ cfg( not( all( target_arch = "wasm32" , target_os = "unknown" ) ) ) ]
23- use getrandom:: getrandom;
24-
2522proxy_wasm:: main! { {
2623 proxy_wasm:: set_log_level( LogLevel :: Trace ) ;
2724 proxy_wasm:: set_root_context( |_| -> Box <dyn RootContext > { Box :: new( HelloWorld ) } ) ;
@@ -47,7 +44,7 @@ impl RootContext for HelloWorld {
4744 } else {
4845 let now: DateTime <Utc > = Utc :: now( ) ;
4946 let mut buf = [ 0u8 ; 1 ] ;
50- getrandom( & mut buf) . unwrap( ) ;
47+ getrandom:: fill ( & mut buf) . unwrap( ) ;
5148 info!( "It's {}, your lucky number is {}." , now, buf[ 0 ] ) ;
5249 }
5350 }
You can’t perform that action at this time.
0 commit comments