refactor: clean up some clippy lints from 1.83 (#1632)

This commit is contained in:
Clement Tsang 2024-11-28 14:16:15 -05:00 committed by GitHub
parent 24cb8a417c
commit 991cc3eed8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 7 deletions

View File

@ -38,7 +38,7 @@ exclude = [
"rustfmt.toml", "rustfmt.toml",
] ]
# The oldest version I've tested that should still build - note this is not an official MSRV! # The oldest version I've tested that should still build - note this is not an official MSRV!
rust-version = "1.81.0" rust-version = "1.81"
[lib] [lib]
test = true test = true

View File

@ -62,7 +62,7 @@ pub struct TimeGraph<'a> {
pub marker: Marker, pub marker: Marker,
} }
impl<'a> TimeGraph<'a> { impl TimeGraph<'_> {
/// Generates the [`Axis`] for the x-axis. /// Generates the [`Axis`] for the x-axis.
fn generate_x_axis(&self) -> Axis<'_> { fn generate_x_axis(&self) -> Axis<'_> {
// Due to how we display things, we need to adjust the time bound values. // Due to how we display things, we need to adjust the time bound values.

View File

@ -32,7 +32,7 @@ pub struct PipeGauge<'a> {
hide_parts: LabelLimit, hide_parts: LabelLimit,
} }
impl<'a> Default for PipeGauge<'a> { impl Default for PipeGauge<'_> {
fn default() -> Self { fn default() -> Self {
Self { Self {
block: None, block: None,
@ -95,7 +95,7 @@ impl<'a> PipeGauge<'a> {
} }
} }
impl<'a> Widget for PipeGauge<'a> { impl Widget for PipeGauge<'_> {
fn render(mut self, area: Rect, buf: &mut Buffer) { fn render(mut self, area: Rect, buf: &mut Buffer) {
buf.set_style(area, self.label_style); buf.set_style(area, self.label_style);
let gauge_area = match self.block.take() { let gauge_area = match self.block.take() {

View File

@ -400,7 +400,7 @@ impl Grid for HalfBlockGrid {
} }
} }
impl<'a, 'b> Painter<'a, 'b> { impl Painter<'_, '_> {
/// Convert the (x, y) coordinates to location of a point on the grid /// Convert the (x, y) coordinates to location of a point on the grid
/// ///
/// # Examples: /// # Examples:
@ -594,7 +594,7 @@ where
} }
} }
impl<'a, F> Widget for Canvas<'a, F> impl<F> Widget for Canvas<'_, F>
where where
F: Fn(&mut Context<'_>), F: Fn(&mut Context<'_>),
{ {

View File

@ -122,7 +122,6 @@ impl FromStr for FileSystem {
type Err = anyhow::Error; type Err = anyhow::Error;
#[inline] #[inline]
fn from_str(s: &str) -> anyhow::Result<Self> { fn from_str(s: &str) -> anyhow::Result<Self> {
// Done like this as `eq_ignore_ascii_case` avoids a string allocation. // Done like this as `eq_ignore_ascii_case` avoids a string allocation.
Ok(if s.eq_ignore_ascii_case("ext2") { Ok(if s.eq_ignore_ascii_case("ext2") {