diff --git a/src/display.rs b/src/display.rs index 860c0ee..66ef1b7 100644 --- a/src/display.rs +++ b/src/display.rs @@ -1668,7 +1668,7 @@ pub fn truncate_string(s: &mut String, len: usize) { pub fn auto_max_string_len( blocks: &[impl Block], offset: usize, - variable_lens: &Vec, + #[allow(clippy::ptr_arg)] variable_lens: &Vec, settings: &PrintSettings, ) -> Option { if variable_lens.is_empty() { diff --git a/src/lsusb.rs b/src/lsusb.rs index 62ef35c..a69849f 100644 --- a/src/lsusb.rs +++ b/src/lsusb.rs @@ -613,12 +613,12 @@ pub mod profiler { }; if let Some(root_hub) = root { - new_bus.name = root_hub.name.to_owned(); - new_bus.host_controller = root_hub + root_hub.name.clone_into(&mut new_bus.name); + root_hub .manufacturer .as_ref() .unwrap_or(&String::new()) - .to_owned(); + .clone_into(&mut new_bus.host_controller); new_bus.pci_vendor = root_hub.vendor_id; new_bus.pci_device = root_hub.product_id; }