Skip to content

Commit 8b3b278

Browse files
Simplify match arms
1 parent fa365d8 commit 8b3b278

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/generate.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,8 @@ pub fn interrupt(
243243
match *target {
244244
Target::CortexM => {
245245
let is_armv6 = match device.cpu {
246-
Some(ref cpu) if cpu.name.starts_with("CM0") => true,
247-
Some(_) => false,
248-
_ => true, // default to armv6 when the <cpu> section is missing
246+
Some(ref cpu) => cpu.name.starts_with("CM0"),
247+
None => true, // default to armv6 when the <cpu> section is missing
249248
};
250249

251250
if is_armv6 {

0 commit comments

Comments
 (0)