File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,7 @@ impl Generator for ReseedingCore {
5151 #[ inline( always) ]
5252 fn generate ( & mut self , results : & mut Results ) {
5353 if self . inner . get_block_pos ( ) >= RESEED_BLOCK_THRESHOLD {
54- // We get better performance by not calling only `reseed` here
55- // and continuing with the rest of the function, but by directly
56- // returning from a non-inlined function.
57- return self . reseed_and_generate ( results) ;
54+ self . try_to_reseed ( ) ;
5855 }
5956 self . inner . generate ( results) ;
6057 }
@@ -68,14 +65,12 @@ impl ReseedingCore {
6865
6966 #[ cold]
7067 #[ inline( never) ]
71- fn reseed_and_generate ( & mut self , results : & mut Results ) {
68+ fn try_to_reseed ( & mut self ) {
7269 trace ! ( "Reseeding RNG (periodic reseed)" ) ;
7370
7471 if let Err ( e) = self . reseed ( ) {
7572 warn ! ( "Reseeding RNG failed: {e}" ) ;
7673 }
77-
78- self . inner . generate ( results) ;
7974 }
8075}
8176
You can’t perform that action at this time.
0 commit comments