Skip to content

Commit 6540ba0

Browse files
committed
fix clusters check
1 parent b8a2ed9 commit 6540ba0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/patch/peripheral.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ impl RegisterBlockExt for Peripheral {
447447
}
448448

449449
fn add_cluster(&mut self, cname: &str, cadd: &Hash) -> PatchResult {
450-
if self.all_registers().any(|c| c.name == cname) {
450+
if self.clusters().any(|c| c.name == cname) {
451451
return Err(anyhow!(
452-
"peripheral {} already has a register {cname}",
452+
"peripheral {} already has a cluster {cname}",
453453
self.name
454454
));
455455
}

0 commit comments

Comments
 (0)