@@ -200,8 +200,8 @@ pub trait TryRngCore {
200
200
/// Fill `dest` entirely with random data.
201
201
fn try_fill_bytes ( & mut self , dst : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > ;
202
202
203
- /// Wrap RNG with the [`PanicOnErr `] wrapper.
204
- fn panic_on_err ( self ) -> UnwrapErr < Self >
203
+ /// Wrap RNG with the [`UnwrapErr `] wrapper.
204
+ fn unwrap_err ( self ) -> UnwrapErr < Self >
205
205
where Self : Sized {
206
206
UnwrapErr ( self )
207
207
}
@@ -472,9 +472,6 @@ pub trait SeedableRng: Sized {
472
472
}
473
473
}
474
474
475
- // Implement `RngCore` for references to an `RngCore`.
476
- // Force inlining all functions, so that it is up to the `RngCore`
477
- // implementation and the optimizer to decide on inlining.
478
475
impl < ' a , R : RngCore + ?Sized > RngCore for & ' a mut R {
479
476
#[ inline( always) ]
480
477
fn next_u32 ( & mut self ) -> u32 {
@@ -492,12 +489,8 @@ impl<'a, R: RngCore + ?Sized> RngCore for &'a mut R {
492
489
}
493
490
}
494
491
495
- // Implement `TryCryptoRng` for references to a `TryCryptoRng`.
496
492
impl < ' a , R : CryptoRng + ?Sized > CryptoRng for & ' a mut R { }
497
493
498
- // Implement `RngCore` for boxed references to an `RngCore`.
499
- // Force inlining all functions, so that it is up to the `RngCore`
500
- // implementation and the optimizer to decide on inlining.
501
494
#[ cfg( feature = "alloc" ) ]
502
495
impl < R : RngCore + ?Sized > RngCore for Box < R > {
503
496
#[ inline( always) ]
@@ -516,7 +509,6 @@ impl<R: RngCore + ?Sized> RngCore for Box<R> {
516
509
}
517
510
}
518
511
519
- // Implement `TryCryptoRng` for boxed references to a `TryCryptoRng`.
520
512
#[ cfg( feature = "alloc" ) ]
521
513
#[ cfg_attr( doc_cfg, doc( cfg( feature = "alloc" ) ) ) ]
522
514
impl < R : CryptoRng + ?Sized > CryptoRng for Box < R > { }
0 commit comments