File tree 2 files changed +2
-5
lines changed
2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ log = "0.4"
17
17
proxy-wasm = { path = " ../../" }
18
18
19
19
[target .'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))' .dependencies ]
20
- getrandom = " 0.2 "
20
+ getrandom = " 0.3 "
21
21
22
22
[profile .release ]
23
23
lto = true
Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ use proxy_wasm::traits::*;
19
19
use proxy_wasm:: types:: * ;
20
20
use std:: time:: Duration ;
21
21
22
- #[ cfg( not( all( target_arch = "wasm32" , target_os = "unknown" ) ) ) ]
23
- use getrandom:: getrandom;
24
-
25
22
proxy_wasm:: main! { {
26
23
proxy_wasm:: set_log_level( LogLevel :: Trace ) ;
27
24
proxy_wasm:: set_root_context( |_| -> Box <dyn RootContext > { Box :: new( HelloWorld ) } ) ;
@@ -47,7 +44,7 @@ impl RootContext for HelloWorld {
47
44
} else {
48
45
let now: DateTime <Utc > = Utc :: now( ) ;
49
46
let mut buf = [ 0u8 ; 1 ] ;
50
- getrandom( & mut buf) . unwrap( ) ;
47
+ getrandom:: fill ( & mut buf) . unwrap( ) ;
51
48
info!( "It's {}, your lucky number is {}." , now, buf[ 0 ] ) ;
52
49
}
53
50
}
You can’t perform that action at this time.
0 commit comments