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",
]
# 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]
test = true

View File

@ -62,7 +62,7 @@ pub struct TimeGraph<'a> {
pub marker: Marker,
}
impl<'a> TimeGraph<'a> {
impl TimeGraph<'_> {
/// Generates the [`Axis`] for the x-axis.
fn generate_x_axis(&self) -> Axis<'_> {
// 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,
}
impl<'a> Default for PipeGauge<'a> {
impl Default for PipeGauge<'_> {
fn default() -> Self {
Self {
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) {
buf.set_style(area, self.label_style);
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
///
/// # Examples:
@ -594,7 +594,7 @@ where
}
}
impl<'a, F> Widget for Canvas<'a, F>
impl<F> Widget for Canvas<'_, F>
where
F: Fn(&mut Context<'_>),
{

View File

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