Skip to content

Commit e93c458

Browse files
committed
chore: fix clippy lints
1 parent 05d7daa commit e93c458

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

stm32cubeprogrammer/src/api_types.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -360,28 +360,26 @@ pub mod fus {
360360
if let Some(r#type) = self.r#type {
361361
// Compare the type as well
362362
if let Some(other_type) = other.r#type {
363-
return self.major == other.major
363+
self.major == other.major
364364
&& self.minor == other.minor
365365
&& self.sub == other.sub
366-
&& r#type == other_type;
366+
&& r#type == other_type
367367
} else {
368-
return false;
368+
false
369369
}
370370
} else {
371371
// Do not compare the type
372-
return self.major == other.major
373-
&& self.minor == other.minor
374-
&& self.sub == other.sub;
372+
self.major == other.major && self.minor == other.minor && self.sub == other.sub
375373
}
376374
}
377375
}
378376

379377
impl std::fmt::Display for Version {
380378
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
381379
if let Some(r#type) = self.r#type {
382-
return write!(f, "{}.{}.{}.{}", self.major, self.minor, self.sub, r#type);
380+
write!(f, "{}.{}.{}.{}", self.major, self.minor, self.sub, r#type)
383381
} else {
384-
return write!(f, "{}.{}.{}", self.major, self.minor, self.sub);
382+
write!(f, "{}.{}.{}", self.major, self.minor, self.sub)
385383
}
386384
}
387385
}

0 commit comments

Comments
 (0)