diff --git a/src/draw_target.rs b/src/draw_target.rs index 8c1c33ef..7d020c1f 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 00a3bf82..cc961b0a 100644 --- a/src/style.rs +++ b/src/style.rs @@ -420,7 +420,7 @@ enum WideElement<'a> { Message { align: &'a Alignment }, } -impl<'a> WideElement<'a> { +impl WideElement<'_> { fn expand( self, cur: String, @@ -663,7 +663,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])?; @@ -680,7 +680,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)?; @@ -696,7 +696,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);