Skip to content

Commit df1fa26

Browse files
committed
handle clusters after collect
1 parent 93c41f7 commit df1fa26

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/patch/peripheral.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,6 @@ impl PeripheralExt for Peripheral {
332332
}
333333
}
334334

335-
// Handle clusters
336-
for (cspec, cluster) in pmod.hash_iter("_clusters") {
337-
let cspec = cspec.str()?;
338-
if !cspec.starts_with('_') {
339-
self.process_cluster(cspec, cluster.hash()?, update_fields)
340-
.with_context(|| format!("According to `{cspec}`"))?;
341-
}
342-
}
343-
344335
// Handle registers
345336
for (rspec, register) in pmod {
346337
let rspec = rspec.str()?;
@@ -364,6 +355,15 @@ impl PeripheralExt for Peripheral {
364355
.with_context(|| format!("Collecting registers in cluster `{cname}`"))?;
365356
}
366357

358+
// Handle clusters
359+
for (cspec, cluster) in pmod.hash_iter("_clusters") {
360+
let cspec = cspec.str()?;
361+
if !cspec.starts_with('_') {
362+
self.process_cluster(cspec, cluster.hash()?, update_fields)
363+
.with_context(|| format!("According to `{cspec}`"))?;
364+
}
365+
}
366+
367367
Ok(())
368368
}
369369
}

0 commit comments

Comments
 (0)