File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,9 @@ impl IioThread {
362362 Err ( e) => {
363363 // Can not fail in practice as the queue is known to be empty
364364 // 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" ) ;
366368 return Ok ( ( ) ) ;
367369 }
368370 } ;
@@ -385,7 +387,8 @@ impl IioThread {
385387 if let Some ( ( _, tx) ) = signal_ready. take ( ) {
386388 // Can not fail in practice as the queue is only .take()n
387389 // 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" ) ;
389392 }
390393
391394 break ;
@@ -415,7 +418,8 @@ impl IioThread {
415418 if let Some ( ( content, tx) ) = signal_ready. take ( ) {
416419 // Can not fail in practice as the queue is only .take()n
417420 // 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" ) ;
419423 }
420424 }
421425
You can’t perform that action at this time.
0 commit comments