@@ -291,45 +291,12 @@ impl SeedableRng for StdRng {
291291impl CryptoRng for StdRng { }
292292
293293
294- #[ cfg( all( feature="std" ,
295- any( target_os = "linux" , target_os = "android" ,
296- target_os = "netbsd" ,
297- target_os = "dragonfly" ,
298- target_os = "haiku" ,
299- target_os = "emscripten" ,
300- target_os = "solaris" ,
301- target_os = "cloudabi" ,
302- target_os = "macos" , target_os = "ios" ,
303- target_os = "freebsd" ,
304- target_os = "openbsd" , target_os = "bitrig" ,
305- target_os = "redox" ,
306- target_os = "fuchsia" ,
307- windows,
308- all( target_arch = "wasm32" , feature = "stdweb" ) ,
309- all( target_arch = "wasm32" , feature = "wasm-bindgen" ) ,
310- ) ) ) ]
294+ #[ cfg( feature="rand_os" ) ]
311295#[ derive( Clone , Debug ) ]
312296#[ deprecated( since="0.6.0" , note="import with rand::rngs::OsRng instead" ) ]
313297pub struct OsRng ( rngs:: OsRng ) ;
314298
315- #[ cfg( all( feature="std" ,
316- any( target_os = "linux" , target_os = "android" ,
317- target_os = "netbsd" ,
318- target_os = "dragonfly" ,
319- target_os = "haiku" ,
320- target_os = "emscripten" ,
321- target_os = "solaris" ,
322- target_os = "cloudabi" ,
323- target_os = "macos" , target_os = "ios" ,
324- target_os = "freebsd" ,
325- target_os = "openbsd" , target_os = "bitrig" ,
326- target_os = "redox" ,
327- target_os = "fuchsia" ,
328- windows,
329- all( target_arch = "wasm32" , feature = "stdweb" ) ,
330- all( target_arch = "wasm32" , feature = "wasm-bindgen" ) ,
331- ) ) ) ]
332- #[ cfg( feature="std" ) ]
299+ #[ cfg( feature="rand_os" ) ]
333300impl RngCore for OsRng {
334301 #[ inline( always) ]
335302 fn next_u32 ( & mut self ) -> u32 {
@@ -352,48 +319,14 @@ impl RngCore for OsRng {
352319 }
353320}
354321
355- #[ cfg( all( feature="std" ,
356- any( target_os = "linux" , target_os = "android" ,
357- target_os = "netbsd" ,
358- target_os = "dragonfly" ,
359- target_os = "haiku" ,
360- target_os = "emscripten" ,
361- target_os = "solaris" ,
362- target_os = "cloudabi" ,
363- target_os = "macos" , target_os = "ios" ,
364- target_os = "freebsd" ,
365- target_os = "openbsd" , target_os = "bitrig" ,
366- target_os = "redox" ,
367- target_os = "fuchsia" ,
368- windows,
369- all( target_arch = "wasm32" , feature = "stdweb" ) ,
370- all( target_arch = "wasm32" , feature = "wasm-bindgen" ) ,
371- ) ) ) ]
372- #[ cfg( feature="std" ) ]
322+ #[ cfg( feature="rand_os" ) ]
373323impl OsRng {
374324 pub fn new ( ) -> Result < Self , Error > {
375325 rngs:: OsRng :: new ( ) . map ( OsRng )
376326 }
377327}
378328
379- #[ cfg( all( feature="std" ,
380- any( target_os = "linux" , target_os = "android" ,
381- target_os = "netbsd" ,
382- target_os = "dragonfly" ,
383- target_os = "haiku" ,
384- target_os = "emscripten" ,
385- target_os = "solaris" ,
386- target_os = "cloudabi" ,
387- target_os = "macos" , target_os = "ios" ,
388- target_os = "freebsd" ,
389- target_os = "openbsd" , target_os = "bitrig" ,
390- target_os = "redox" ,
391- target_os = "fuchsia" ,
392- windows,
393- all( target_arch = "wasm32" , feature = "stdweb" ) ,
394- all( target_arch = "wasm32" , feature = "wasm-bindgen" ) ,
395- ) ) ) ]
396- #[ cfg( feature="std" ) ]
329+ #[ cfg( feature="rand_os" ) ]
397330impl CryptoRng for OsRng { }
398331
399332
0 commit comments