File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,9 @@ impl IioThread {
362
362
Err ( e) => {
363
363
// Can not fail in practice as the queue is known to be empty
364
364
// at this point.
365
- thread_res_tx. try_send ( Err ( e) ) . unwrap ( ) ;
365
+ thread_res_tx
366
+ . try_send ( Err ( e) )
367
+ . expect ( "Failed to signal ADC setup error due to full queue" ) ;
366
368
return Ok ( ( ) ) ;
367
369
}
368
370
} ;
@@ -385,7 +387,8 @@ impl IioThread {
385
387
if let Some ( ( _, tx) ) = signal_ready. take ( ) {
386
388
// Can not fail in practice as the queue is only .take()n
387
389
// once and thus known to be empty.
388
- tx. try_send ( Err ( Error :: new ( e) ) ) . unwrap ( ) ;
390
+ tx. try_send ( Err ( Error :: new ( e) ) )
391
+ . expect ( "Failed to signal ADC setup error due to full queue" ) ;
389
392
}
390
393
391
394
break ;
@@ -415,7 +418,8 @@ impl IioThread {
415
418
if let Some ( ( content, tx) ) = signal_ready. take ( ) {
416
419
// Can not fail in practice as the queue is only .take()n
417
420
// once and thus known to be empty.
418
- tx. try_send ( Ok ( content) ) . unwrap ( ) ;
421
+ tx. try_send ( Ok ( content) )
422
+ . expect ( "Failed to signal ADC setup completion due to full queue" ) ;
419
423
}
420
424
}
421
425
You can’t perform that action at this time.
0 commit comments