No need for unwrap
This commit is contained in:
parent
5f5470a320
commit
617a976e96
@ -1,4 +1,3 @@
|
|||||||
use core::convert::TryInto;
|
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use core::sync::atomic::{compiler_fence, Ordering};
|
use core::sync::atomic::{compiler_fence, Ordering};
|
||||||
use core::task::Poll;
|
use core::task::Poll;
|
||||||
@ -189,7 +188,7 @@ impl<'d, const N: usize> OneShot<'d, N> {
|
|||||||
.write(|w| unsafe { w.ptr().bits(buf.as_mut_ptr() as u32) });
|
.write(|w| unsafe { w.ptr().bits(buf.as_mut_ptr() as u32) });
|
||||||
r.result
|
r.result
|
||||||
.maxcnt
|
.maxcnt
|
||||||
.write(|w| unsafe { w.maxcnt().bits(N.try_into().unwrap()) });
|
.write(|w| unsafe { w.maxcnt().bits(N as _) });
|
||||||
|
|
||||||
// Reset and enable the end event
|
// Reset and enable the end event
|
||||||
r.events_end.reset();
|
r.events_end.reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user