clippy clean ups
This commit is contained in:
parent
1e248306a6
commit
8d81ee1f7e
@ -138,7 +138,7 @@ impl App {
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|mm| mm.cpu_per_core.len())
|
.map(|mm| mm.cpu_per_core.len())
|
||||||
.unwrap_or(0);
|
.unwrap_or(0);
|
||||||
per_core_clamp(
|
per_core_clamp(
|
||||||
&mut self.per_core_scroll,
|
&mut self.per_core_scroll,
|
||||||
total_rows,
|
total_rows,
|
||||||
content.height as usize,
|
content.height as usize,
|
||||||
|
|||||||
@ -322,12 +322,12 @@ pub fn draw_per_core_bars(
|
|||||||
.unwrap_or(curr);
|
.unwrap_or(curr);
|
||||||
|
|
||||||
let trend = if curr > older + 0.2 {
|
let trend = if curr > older + 0.2 {
|
||||||
"↑"
|
"↑"
|
||||||
} else if curr + 0.2 < older {
|
} else if curr + 0.2 < older {
|
||||||
"↓"
|
"↓"
|
||||||
} else {
|
} else {
|
||||||
"╌"
|
"╌"
|
||||||
};
|
};
|
||||||
|
|
||||||
let fg = match curr {
|
let fg = match curr {
|
||||||
x if x < 25.0 => Color::Green,
|
x if x < 25.0 => Color::Green,
|
||||||
|
|||||||
@ -21,8 +21,8 @@ fn fmt_bytes(b: u64) -> String {
|
|||||||
format!("{:.1}K", fb / KB)
|
format!("{:.1}K", fb / KB)
|
||||||
} else {
|
} else {
|
||||||
format!("{b}B")
|
format!("{b}B")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn draw_gpu(f: &mut ratatui::Frame<'_>, area: Rect, m: Option<&Metrics>) {
|
pub fn draw_gpu(f: &mut ratatui::Frame<'_>, area: Rect, m: Option<&Metrics>) {
|
||||||
let mut area = area;
|
let mut area = area;
|
||||||
|
|||||||
@ -30,7 +30,6 @@ pub struct AppState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl AppState {
|
impl AppState {
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
let sys = System::new(); // targeted refreshes per tick
|
let sys = System::new(); // targeted refreshes per tick
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user