File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,6 @@ extern crate alloc;
179
179
180
180
use core:: {
181
181
cell:: UnsafeCell ,
182
- convert:: Infallible ,
183
182
ffi:: { c_int, c_uint, CStr } ,
184
183
future:: Future ,
185
184
mem,
@@ -393,13 +392,13 @@ impl Signal {
393
392
/// Create a new `Signal`.
394
393
///
395
394
/// The Signal will be in the non-signaled state.
396
- pub fn new ( ) -> Result < Signal , Infallible > {
395
+ pub fn new ( ) -> Signal {
397
396
// SAFETY: The memory is zero initialized, and Fixed ensure that it never changes address.
398
397
let item: Fixed < k_poll_signal > = Fixed :: new ( unsafe { mem:: zeroed ( ) } ) ;
399
398
unsafe {
400
399
k_poll_signal_init ( item. get ( ) ) ;
401
400
}
402
- Ok ( Signal { item } )
401
+ Signal { item }
403
402
}
404
403
405
404
/// Reset the Signal
@@ -469,7 +468,7 @@ impl Signal {
469
468
470
469
impl Default for Signal {
471
470
fn default ( ) -> Self {
472
- Signal :: new ( ) . unwrap ( )
471
+ Signal :: new ( )
473
472
}
474
473
}
475
474
You can’t perform that action at this time.
0 commit comments