From fb0cfc155564ba657a3416cc84dfba2758d5be30 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 2 Dec 2024 11:08:38 +0100 Subject: [PATCH] Apply suggestions from clippy 1.83 --- src/draw_target.rs | 2 +- src/style.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/draw_target.rs b/src/draw_target.rs index 689e2f17..885c9870 100644 --- a/src/draw_target.rs +++ b/src/draw_target.rs @@ -295,7 +295,7 @@ pub(crate) enum Drawable<'a> { }, } -impl<'a> Drawable<'a> { +impl Drawable<'_> { /// Adjust `last_line_count` such that the next draw operation keeps/clears additional lines pub(crate) fn adjust_last_line_count(&mut self, adjust: LineAdjust) { let last_line_count: &mut VisualLines = match self { diff --git a/src/style.rs b/src/style.rs index 2d148a28..a8b00069 100644 --- a/src/style.rs +++ b/src/style.rs @@ -418,7 +418,7 @@ enum WideElement<'a> { Message { align: &'a Alignment }, } -impl<'a> WideElement<'a> { +impl WideElement<'_> { fn expand( self, cur: String, @@ -661,7 +661,7 @@ struct BarDisplay<'a> { rest: console::StyledObject>, } -impl<'a> fmt::Display for BarDisplay<'a> { +impl fmt::Display for BarDisplay<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { for _ in 0..self.filled { f.write_str(&self.chars[0])?; @@ -678,7 +678,7 @@ struct RepeatedStringDisplay<'a> { num: usize, } -impl<'a> fmt::Display for RepeatedStringDisplay<'a> { +impl fmt::Display for RepeatedStringDisplay<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { for _ in 0..self.num { f.write_str(self.str)?; @@ -694,7 +694,7 @@ struct PaddedStringDisplay<'a> { truncate: bool, } -impl<'a> fmt::Display for PaddedStringDisplay<'a> { +impl fmt::Display for PaddedStringDisplay<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let cols = measure_text_width(self.str); let excess = cols.saturating_sub(self.width);