From eaf19a2f44a1c74e5dc0f4d648311bccc7de47d1 Mon Sep 17 00:00:00 2001 From: Benjamin Klum Date: Wed, 30 Oct 2024 17:53:15 +0100 Subject: [PATCH] Fix warnings --- main/src/domain/midi_types.rs | 2 +- main/src/infrastructure/ui/mapping_panel.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/src/domain/midi_types.rs b/main/src/domain/midi_types.rs index b93c17bc1..ec17086ca 100644 --- a/main/src/domain/midi_types.rs +++ b/main/src/domain/midi_types.rs @@ -50,7 +50,7 @@ impl SampleOffset { self.0 } - pub fn to_seconds(&self, sample_rate: Hz) -> DurationInSeconds { + pub fn to_seconds(self, sample_rate: Hz) -> DurationInSeconds { DurationInSeconds::new_panic(self.0 as f64 / sample_rate.get()) } } diff --git a/main/src/infrastructure/ui/mapping_panel.rs b/main/src/infrastructure/ui/mapping_panel.rs index 472dd10ad..6db1439ce 100644 --- a/main/src/infrastructure/ui/mapping_panel.rs +++ b/main/src/infrastructure/ui/mapping_panel.rs @@ -7778,13 +7778,13 @@ fn pick_virtual_control_element( control_element_domains::daw::PREDEFINED_VIRTUAL_BUTTON_NAMES .iter() .chain(control_element_domains::daw::PREDEFINED_VIRTUAL_MULTI_NAMES.iter()) - .map(|e| *e) + .copied() .collect(); let grid_control_names: Vec<_> = control_element_domains::grid::PREDEFINED_VIRTUAL_BUTTON_NAMES .iter() .chain(control_element_domains::grid::PREDEFINED_VIRTUAL_MULTI_NAMES.iter()) - .map(|e| *e) + .copied() .collect(); let include_actual_element = |mappings: &[&SharedMapping]| -> bool { @@ -8122,7 +8122,7 @@ fn build_slash_menu_entries( } } else { // A nested entry (menu). - let remaining_names: Vec<_> = group.map(|name| extract_remaining_name(name)).collect(); + let remaining_names: Vec<_> = group.map(extract_remaining_name).collect(); let new_prefix = if prefix.is_empty() { key.to_string() } else {