Skip to content

Commit

Permalink
fix clippy updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tuna-f1sh committed May 7, 2024
1 parent be3eb76 commit 91e7ba8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,7 @@ pub fn truncate_string(s: &mut String, len: usize) {
pub fn auto_max_string_len<B: Eq + Hash, T>(
blocks: &[impl Block<B, T>],
offset: usize,
#[allow(clippy::ptr_arg)]
variable_lens: &Vec<usize>,
settings: &PrintSettings,
) -> Option<usize> {
Expand Down
7 changes: 3 additions & 4 deletions src/lsusb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,11 @@ 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();
.unwrap_or(&String::new()).clone_into(&mut new_bus.host_controller);
new_bus.pci_vendor = root_hub.vendor_id;
new_bus.pci_device = root_hub.product_id;
}
Expand Down

0 comments on commit 91e7ba8

Please sign in to comment.