Skip to content

Commit

Permalink
peripheral: Fix empty descriptions
Browse files Browse the repository at this point in the history
Ensure that atdf2svd never emits an empty peripheral description.

Signed-off-by: Rahix <rahix@rahix.de>
  • Loading branch information
Rahix committed Nov 24, 2020
1 parent 11729b2 commit 3f0003c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/atdf/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ pub fn parse_list(
.attr("caption")
.or(module.attr("caption"))
.ok()
.cloned(),
.cloned()
.and_then(|d| if !d.is_empty() { Some(d) } else { None }),
registers,
})
}
Expand Down

0 comments on commit 3f0003c

Please sign in to comment.