clippy clean ups

This commit is contained in:
jasonwitty 2025-08-11 23:37:50 -07:00
parent 1e248306a6
commit 8d81ee1f7e
5 changed files with 7 additions and 8 deletions

View File

@ -138,7 +138,7 @@ impl App {
.as_ref()
.map(|mm| mm.cpu_per_core.len())
.unwrap_or(0);
per_core_clamp(
per_core_clamp(
&mut self.per_core_scroll,
total_rows,
content.height as usize,

View File

@ -322,12 +322,12 @@ pub fn draw_per_core_bars(
.unwrap_or(curr);
let trend = if curr > older + 0.2 {
""
""
} else if curr + 0.2 < older {
""
} else {
""
};
};
let fg = match curr {
x if x < 25.0 => Color::Green,

View File

@ -21,8 +21,8 @@ fn fmt_bytes(b: u64) -> String {
format!("{:.1}K", fb / KB)
} else {
format!("{b}B")
}
}
}
pub fn draw_gpu(f: &mut ratatui::Frame<'_>, area: Rect, m: Option<&Metrics>) {
let mut area = area;

View File

@ -30,7 +30,6 @@ pub struct AppState {
}
impl AppState {
#[allow(dead_code)]
pub fn new() -> Self {
let sys = System::new(); // targeted refreshes per tick