diff --git a/crates/buffered_watch/src/sender.rs b/crates/buffered_watch/src/sender.rs index c6667eda29..cbf0a25ce1 100644 --- a/crates/buffered_watch/src/sender.rs +++ b/crates/buffered_watch/src/sender.rs @@ -72,7 +72,7 @@ pub struct SenderGuard<'lock, T> { buffer: &'lock mut T, } -impl<'lock, T> Deref for SenderGuard<'lock, T> { +impl Deref for SenderGuard<'_, T> { type Target = T; fn deref(&self) -> &Self::Target { @@ -80,13 +80,13 @@ impl<'lock, T> Deref for SenderGuard<'lock, T> { } } -impl<'lock, T> DerefMut for SenderGuard<'lock, T> { +impl DerefMut for SenderGuard<'_, T> { fn deref_mut(&mut self) -> &mut T { self.buffer.deref_mut() } } -impl<'lock, T> Drop for SenderGuard<'lock, T> { +impl Drop for SenderGuard<'_, T> { fn drop(&mut self) { { let mut states = self.shared.states.lock(); diff --git a/crates/hulk_nao/src/double_buffered_reader.rs b/crates/hulk_nao/src/double_buffered_reader.rs index d8a27cde18..09f2c81745 100644 --- a/crates/hulk_nao/src/double_buffered_reader.rs +++ b/crates/hulk_nao/src/double_buffered_reader.rs @@ -286,12 +286,12 @@ mod tests { struct Reader<'buffer> { reversed_items: Vec>>, } - impl<'buffer> AsRawFd for Reader<'buffer> { + impl AsRawFd for Reader<'_> { fn as_raw_fd(&self) -> RawFd { FIXED_FILE_DESCRIPTOR } } - impl<'buffer> Read for Reader<'buffer> { + impl Read for Reader<'_> { fn read(&mut self, buffer: &mut [u8]) -> io::Result { match self.reversed_items.pop() { Some(Some(item)) => { @@ -344,12 +344,12 @@ mod tests { struct Reader<'buffer> { reversed_items: Vec>>, } - impl<'buffer> AsRawFd for Reader<'buffer> { + impl AsRawFd for Reader<'_> { fn as_raw_fd(&self) -> RawFd { FIXED_FILE_DESCRIPTOR } } - impl<'buffer> Read for Reader<'buffer> { + impl Read for Reader<'_> { fn read(&mut self, buffer: &mut [u8]) -> io::Result { match self.reversed_items.pop() { Some(Some(item)) => { @@ -407,12 +407,12 @@ mod tests { struct Reader<'buffer> { reversed_items: Vec>>, } - impl<'buffer> AsRawFd for Reader<'buffer> { + impl AsRawFd for Reader<'_> { fn as_raw_fd(&self) -> RawFd { FIXED_FILE_DESCRIPTOR } } - impl<'buffer> Read for Reader<'buffer> { + impl Read for Reader<'_> { fn read(&mut self, buffer: &mut [u8]) -> io::Result { match self.reversed_items.pop() { Some(Some(item)) => { diff --git a/crates/hulk_replayer/src/frames.rs b/crates/hulk_replayer/src/frames.rs index dfe9600f81..5558f582d0 100644 --- a/crates/hulk_replayer/src/frames.rs +++ b/crates/hulk_replayer/src/frames.rs @@ -184,7 +184,7 @@ impl<'state> Frames<'state> { } } -impl<'state> Widget for Frames<'state> { +impl Widget for Frames<'_> { fn ui(mut self, ui: &mut Ui) -> Response { let (mut response, painter) = ui.allocate_painter(ui.available_size(), Sense::click_and_drag()); diff --git a/crates/hulk_replayer/src/labels.rs b/crates/hulk_replayer/src/labels.rs index 8b87be680f..ccce90f9ec 100644 --- a/crates/hulk_replayer/src/labels.rs +++ b/crates/hulk_replayer/src/labels.rs @@ -26,7 +26,7 @@ impl<'state> Labels<'state> { } } -impl<'state> Widget for Labels<'state> { +impl Widget for Labels<'_> { fn ui(self, ui: &mut Ui) -> Response { let spacing = ui.spacing().item_spacing.y; let total_spacing = spacing * (self.labels.len() - 1) as f32; diff --git a/crates/hulk_replayer/src/ticks.rs b/crates/hulk_replayer/src/ticks.rs index 4bbe346bee..cebb3574cd 100644 --- a/crates/hulk_replayer/src/ticks.rs +++ b/crates/hulk_replayer/src/ticks.rs @@ -151,7 +151,7 @@ impl<'state> Ticks<'state> { } } -impl<'state> Widget for Ticks<'state> { +impl Widget for Ticks<'_> { fn ui(self, ui: &mut Ui) -> Response { let mut size = ui.available_size(); size.y = ticks_height(ui); diff --git a/crates/hulk_replayer/src/timeline.rs b/crates/hulk_replayer/src/timeline.rs index 976c863441..fb50d606fa 100644 --- a/crates/hulk_replayer/src/timeline.rs +++ b/crates/hulk_replayer/src/timeline.rs @@ -33,7 +33,7 @@ impl<'state> Timeline<'state> { } } -impl<'state> Widget for Timeline<'state> { +impl Widget for Timeline<'_> { fn ui(self, ui: &mut Ui) -> Response { let original_item_spacing = ui.spacing().item_spacing; ui.spacing_mut().item_spacing = Vec2::ZERO; diff --git a/crates/types/src/players.rs b/crates/types/src/players.rs index 65cf7e8c6c..1d31cacd51 100644 --- a/crates/types/src/players.rs +++ b/crates/types/src/players.rs @@ -144,7 +144,7 @@ impl<'a, T> Iterator for PlayersIterator<'a, T> { } } -impl<'a, T> DoubleEndedIterator for PlayersIterator<'a, T> { +impl DoubleEndedIterator for PlayersIterator<'_, T> { fn next_back(&mut self) -> Option { let result = self.next_back.map(|number| (number, &self.data[number])); if self.next_forward == self.next_back { @@ -165,7 +165,7 @@ impl<'a, T> DoubleEndedIterator for PlayersIterator<'a, T> { } } -impl<'a, T> ExactSizeIterator for PlayersIterator<'a, T> { +impl ExactSizeIterator for PlayersIterator<'_, T> { // The default implementation only requires `Iterator::size_hint()` to be exact } diff --git a/crates/walking_engine/src/lib.rs b/crates/walking_engine/src/lib.rs index c6427d0d1e..8c87a7cd95 100644 --- a/crates/walking_engine/src/lib.rs +++ b/crates/walking_engine/src/lib.rs @@ -33,7 +33,6 @@ mod stiffness; /// The algorithm to compute the feet trajectories is loosely based on the work of Bernhard Hengst /// at the team rUNSWift. An explanation of this algorithm can be found in the team's research /// report from 2014 (). - pub struct Context<'a> { pub parameters: &'a Parameters, pub kick_steps: &'a KickSteps, diff --git a/tools/annotato/src/widgets/bounding_box_annotator.rs b/tools/annotato/src/widgets/bounding_box_annotator.rs index 31fafd8fc0..084b8ab83c 100644 --- a/tools/annotato/src/widgets/bounding_box_annotator.rs +++ b/tools/annotato/src/widgets/bounding_box_annotator.rs @@ -120,7 +120,7 @@ impl<'a> BoundingBoxAnnotator<'a> { } } -impl<'a> Widget for BoundingBoxAnnotator<'a> { +impl Widget for BoundingBoxAnnotator<'_> { fn ui(mut self, ui: &mut Ui) -> Response { let response = Plot::new(self.id) .data_aspect(1.) diff --git a/tools/annotato/src/widgets/class_selector.rs b/tools/annotato/src/widgets/class_selector.rs index 331b754dd8..48112128e1 100644 --- a/tools/annotato/src/widgets/class_selector.rs +++ b/tools/annotato/src/widgets/class_selector.rs @@ -22,7 +22,7 @@ impl<'a> ClassSelector<'a> { } } -impl<'a> Widget for ClassSelector<'a> { +impl Widget for ClassSelector<'_> { fn ui(self, ui: &mut Ui) -> Response { if let Some(class) = ui.input(|i| i.keys_down.iter().find_map(|key| Class::from_key(*key))) { diff --git a/tools/annotato/src/widgets/image_list.rs b/tools/annotato/src/widgets/image_list.rs index edc04fd8a5..55596ff1be 100644 --- a/tools/annotato/src/widgets/image_list.rs +++ b/tools/annotato/src/widgets/image_list.rs @@ -16,7 +16,7 @@ impl<'a> ImageList<'a> { } } -impl<'a> Widget for ImageList<'a> { +impl Widget for ImageList<'_> { fn ui(self, ui: &mut eframe::egui::Ui) -> eframe::egui::Response { ui.vertical(|ui| { ui.label("Image List"); diff --git a/tools/annotato/src/widgets/path_row.rs b/tools/annotato/src/widgets/path_row.rs index b9a12b4216..ab0a08793f 100644 --- a/tools/annotato/src/widgets/path_row.rs +++ b/tools/annotato/src/widgets/path_row.rs @@ -24,7 +24,7 @@ impl<'a> Row<'a> { } } -impl<'a> Widget for Row<'a> { +impl Widget for Row<'_> { fn ui(self, ui: &mut Ui) -> Response { let filename = self.paths.image_path.display().to_string(); let is_labelled = self.paths.label_present; diff --git a/tools/twix/src/configuration/keys.rs b/tools/twix/src/configuration/keys.rs index 56102269b5..7d2bf6a629 100644 --- a/tools/twix/src/configuration/keys.rs +++ b/tools/twix/src/configuration/keys.rs @@ -112,7 +112,7 @@ impl<'de> Deserialize<'de> for KeybindTrigger { { struct Visitor; - impl<'de> de::Visitor<'de> for Visitor { + impl de::Visitor<'_> for Visitor { type Value = KeybindTrigger; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/tools/twix/src/panels/image/cycler_selector.rs b/tools/twix/src/panels/image/cycler_selector.rs index cf900e256c..9032bf285a 100644 --- a/tools/twix/src/panels/image/cycler_selector.rs +++ b/tools/twix/src/panels/image/cycler_selector.rs @@ -46,7 +46,7 @@ impl<'a> VisionCyclerSelector<'a> { } } -impl<'a> Widget for &mut VisionCyclerSelector<'a> { +impl Widget for &mut VisionCyclerSelector<'_> { fn ui(self, ui: &mut Ui) -> Response { let mut selection_changed = false; let mut combo_box = ComboBox::from_label("Cycler")