Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Jun 28, 2024
1 parent e420b75 commit 61b44d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/patch/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ impl DeviceExt for Device {
.enumerate()
.find(|(_, f)| f.name == pnew)
.ok_or_else(|| anyhow!("peripheral {pnew} not found"))?;
d.name = new.name.clone();
d.name.clone_from(&new.name);
d.base_address = new.base_address;
d.interrupt = new.interrupt.clone();
d.interrupt.clone_from(&new.interrupt);
*new = d;
for (i, p) in self.peripherals.iter_mut().enumerate() {
if p.derived_from.as_deref() == Some(pold) {
Expand Down
2 changes: 2 additions & 0 deletions src/patch/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ pub(crate) trait RegisterBlockExt: Name {
fn get_mut_reg(&mut self, name: &str) -> Option<&mut Register>;

/// Register/cluster block
#[allow(unused)]
fn children(&self) -> Option<&Vec<RegisterCluster>>;

/// Register/cluster block
Expand Down Expand Up @@ -402,6 +403,7 @@ pub(crate) trait RegisterBlockExt: Name {
}
}
/// Work through a register, handling all fields
#[allow(unused)]
fn process_register(
&mut self,
rspec: &str,
Expand Down
2 changes: 1 addition & 1 deletion src/patch/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ impl RegisterExt for Register {
for f in fields.iter_mut() {
if names.contains(&f.name) {
if first {
desc = f.description.clone();
desc.clone_from(&f.description);
first = false;
}
bitwidth += f.bit_range.width;
Expand Down

0 comments on commit 61b44d0

Please sign in to comment.