Skip to content

Commit

Permalink
Take nightly clippy advice
Browse files Browse the repository at this point in the history
  • Loading branch information
yarrow committed Mar 6, 2024
1 parent 548108f commit b6a0c67
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ impl<'a> Section<'a> {
Ok(0)
}
fn next_line_help_indent(&self) -> &'a str {
let max_indent =
self.entries.iter().map(|e| e.item.indented_by()).fold(0, std::cmp::Ord::max);
let max_indent = self.entries.iter().map(|e| e.item.indented_by()).fold(0, Ord::max);
let indent_len = (max_indent + 4).min(BLANKS.len());
&BLANKS[..indent_len]
}
Expand Down

2 comments on commit b6a0c67

@chenrui333
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yarrow 👋 can you cut a new release for this? Seeing the build error in Homebrew/homebrew-core#178436

  error: unnecessary qualification
     --> src/help.rs:112:71
      |
  112 |             self.entries.iter().map(|e| e.item.indented_by()).fold(0, std::cmp::Ord::max);
      |                                                                       ^^^^^^^^^^^^^^^^^^
      |
  note: the lint level is defined here
     --> src/lib.rs:68:5
      |
  68  |     unused_qualifications,
      |     ^^^^^^^^^^^^^^^^^^^^^
  help: remove the unnecessary path segments
      |
  112 -             self.entries.iter().map(|e| e.item.indented_by()).fold(0, std::cmp::Ord::max);
  112 +             self.entries.iter().map(|e| e.item.indented_by()).fold(0, Ord::max);
      |

@yarrow
Copy link
Owner Author

@yarrow yarrow commented on b6a0c67 Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yarrow 👋 can you cut a new release for this? Seeing the build error in Homebrew/homebrew-core#178436

Thanks for the nudge — I need to update cargo-dist, but should have a release in a few days.

Please sign in to comment.