File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -269,8 +269,8 @@ mod app {
269269
270270 fn handle_valid_pus_tc ( cx : & mut pus_tc_handler:: Context ) {
271271 let pus_tc = PusTcReader :: new ( cx. local . tc_buf ) ;
272- if pus_tc . is_err ( ) {
273- defmt:: warn!( "PUS TC error: {}" , pus_tc . unwrap_err ( ) ) ;
272+ if let Err ( e ) = pus_tc {
273+ defmt:: warn!( "PUS TC error: {}" , e ) ;
274274 return ;
275275 }
276276 let pus_tc = pus_tc. unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ pub struct OptWdt(Option<Wdt>);
8686
8787impl WdtInterface for OptWdt {
8888 fn feed ( & self ) {
89- if self . 0 . is_some ( ) {
90- self . 0 . as_ref ( ) . unwrap ( ) . feed ( ) ;
89+ if let Some ( wdt ) = & self . 0 {
90+ wdt . feed ( ) ;
9191 }
9292 }
9393}
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ pub struct OptWdt(Option<Wdt>);
4646
4747impl WdtInterface for OptWdt {
4848 fn feed ( & self ) {
49- if self . 0 . is_some ( ) {
50- self . 0 . as_ref ( ) . unwrap ( ) . feed ( ) ;
49+ if let Some ( wdt ) = & self . 0 {
50+ wdt . feed ( ) ;
5151 }
5252 }
5353}
@@ -344,8 +344,8 @@ mod app {
344344
345345 fn handle_valid_pus_tc ( cx : & mut pus_tc_handler:: Context ) {
346346 let pus_tc = PusTcReader :: new ( cx. local . tc_buf ) ;
347- if pus_tc . is_err ( ) {
348- defmt:: warn!( "PUS TC error: {}" , pus_tc . unwrap_err ( ) ) ;
347+ if let Err ( e ) = pus_tc {
348+ defmt:: warn!( "PUS TC error: {}" , e ) ;
349349 return ;
350350 }
351351 let pus_tc = pus_tc. unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments