Skip to content

Commit c020833

Browse files
bors[bot]burrbull
andcommitted
Merge #325
325: fix cluster size r=therealprof a=burrbull Fix misusing cluster size tag. Close #299 . r? @therealprof Co-authored-by: Andrey Zgarbul <[email protected]>
2 parents fbaaa28 + 4bd4e64 commit c020833

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/generate/peripheral.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,7 @@ fn cluster_size_in_bits(info: &ClusterInfo, defs: &Defaults) -> Result<u32> {
599599
fn expand_cluster(cluster: &Cluster, defs: &Defaults) -> Result<Vec<RegisterBlockField>> {
600600
let mut cluster_expanded = vec![];
601601

602-
let cluster_size = cluster
603-
.size
604-
.ok_or_else(|| format!("Cluster {} has no explictly defined size", cluster.name))
605-
.or_else(|_e| cluster_size_in_bits(cluster, defs))
602+
let cluster_size = cluster_size_in_bits(cluster, defs)
606603
.chain_err(|| format!("Cluster {} has no determinable `size` field", cluster.name))?;
607604

608605
match cluster {

0 commit comments

Comments
 (0)