Move initialisation inside of future
This commit is contained in:
parent
8a4ab29819
commit
ae0219de6f
1 changed files with 3 additions and 3 deletions
|
@ -97,10 +97,10 @@ impl<'d> traits::rng::Rng for Rng<'d> {
|
|||
type RngFuture<'a> where 'd: 'a = impl Future<Output = Result<(), Self::Error>> + 'a;
|
||||
|
||||
fn fill_bytes<'a>(&'a mut self, dest: &'a mut [u8]) -> Self::RngFuture<'a> {
|
||||
async move {
|
||||
self.enable_irq();
|
||||
self.start();
|
||||
|
||||
async move {
|
||||
let on_drop = OnDrop::new(|| {
|
||||
self.stop();
|
||||
self.disable_irq();
|
||||
|
|
Loading…
Reference in a new issue