@@ -400,7 +400,7 @@ pub trait SeedableRng: Sized {
400
400
/// since it is convenient and secure.
401
401
///
402
402
/// Note that this method may panic on (extremely unlikely) [`getrandom`] errors.
403
- /// If it's not desirable, use the [`try_from_entropy `] method instead.
403
+ /// If it's not desirable, use the [`try_from_os_rng `] method instead.
404
404
///
405
405
/// In case the overhead of using [`getrandom`] to seed *many* PRNGs is an
406
406
/// issue, one may prefer to seed from a local PRNG, e.g.
@@ -411,13 +411,13 @@ pub trait SeedableRng: Sized {
411
411
/// If [`getrandom`] is unable to provide secure entropy this method will panic.
412
412
///
413
413
/// [`getrandom`]: https://docs.rs/getrandom
414
- /// [`try_from_entropy `]: SeedableRng::try_from_entropy
414
+ /// [`try_from_os_rng `]: SeedableRng::try_from_os_rng
415
415
#[ cfg( feature = "getrandom" ) ]
416
416
#[ cfg_attr( doc_cfg, doc( cfg( feature = "getrandom" ) ) ) ]
417
- fn from_entropy ( ) -> Self {
418
- match Self :: try_from_entropy ( ) {
417
+ fn from_os_rng ( ) -> Self {
418
+ match Self :: try_from_os_rng ( ) {
419
419
Ok ( res) => res,
420
- Err ( err) => panic ! ( "from_entropy failed: {}" , err) ,
420
+ Err ( err) => panic ! ( "from_os_rng failed: {}" , err) ,
421
421
}
422
422
}
423
423
@@ -431,7 +431,7 @@ pub trait SeedableRng: Sized {
431
431
/// [`getrandom`]: https://docs.rs/getrandom
432
432
#[ cfg( feature = "getrandom" ) ]
433
433
#[ cfg_attr( doc_cfg, doc( cfg( feature = "getrandom" ) ) ) ]
434
- fn try_from_entropy ( ) -> Result < Self , getrandom:: Error > {
434
+ fn try_from_os_rng ( ) -> Result < Self , getrandom:: Error > {
435
435
let mut seed = Self :: Seed :: default ( ) ;
436
436
getrandom:: getrandom ( seed. as_mut ( ) ) ?;
437
437
let res = Self :: from_seed ( seed) ;
0 commit comments