mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-04-08 17:05:59 +02:00
refactor: clean up some clippy lints from 1.83 (#1632)
This commit is contained in:
parent
24cb8a417c
commit
991cc3eed8
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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() {
|
||||
|
@ -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<'_>),
|
||||
{
|
||||
|
@ -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") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user