clippy fixes #14

Merged
muellerr merged 1 commits from clippy-fixes into main 2026-02-25 13:00:37 +01:00
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -269,8 +269,8 @@ mod app {
fn handle_valid_pus_tc(cx: &mut pus_tc_handler::Context) {
let pus_tc = PusTcReader::new(cx.local.tc_buf);
if pus_tc.is_err() {
defmt::warn!("PUS TC error: {}", pus_tc.unwrap_err());
if let Err(e) = pus_tc {
defmt::warn!("PUS TC error: {}", e);
return;
}
let pus_tc = pus_tc.unwrap();
+2 -2
View File
@@ -86,8 +86,8 @@ pub struct OptWdt(Option<Wdt>);
impl WdtInterface for OptWdt {
fn feed(&self) {
if self.0.is_some() {
self.0.as_ref().unwrap().feed();
if let Some(wdt) = &self.0 {
wdt.feed();
}
}
}
+4 -4
View File
@@ -46,8 +46,8 @@ pub struct OptWdt(Option<Wdt>);
impl WdtInterface for OptWdt {
fn feed(&self) {
if self.0.is_some() {
self.0.as_ref().unwrap().feed();
if let Some(wdt) = &self.0 {
wdt.feed();
}
}
}
@@ -344,8 +344,8 @@ mod app {
fn handle_valid_pus_tc(cx: &mut pus_tc_handler::Context) {
let pus_tc = PusTcReader::new(cx.local.tc_buf);
if pus_tc.is_err() {
defmt::warn!("PUS TC error: {}", pus_tc.unwrap_err());
if let Err(e) = pus_tc {
defmt::warn!("PUS TC error: {}", e);
return;
}
let pus_tc = pus_tc.unwrap();