Skip to content

Commit

Permalink
Apply suggestions from clippy 1.83
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Dec 2, 2024
1 parent fb5c6f1 commit fb0cfc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/draw_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ enum WideElement<'a> {
Message { align: &'a Alignment },
}

impl<'a> WideElement<'a> {
impl WideElement<'_> {
fn expand(
self,
cur: String,
Expand Down Expand Up @@ -661,7 +661,7 @@ struct BarDisplay<'a> {
rest: console::StyledObject<RepeatedStringDisplay<'a>>,
}

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])?;
Expand All @@ -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)?;
Expand All @@ -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);
Expand Down

0 comments on commit fb0cfc1

Please sign in to comment.