diff options
Diffstat (limited to 'src/canvas/widgets/cpu_graph.rs')
-rw-r--r-- | src/canvas/widgets/cpu_graph.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/canvas/widgets/cpu_graph.rs b/src/canvas/widgets/cpu_graph.rs index e6957ff6..9e9dab2f 100644 --- a/src/canvas/widgets/cpu_graph.rs +++ b/src/canvas/widgets/cpu_graph.rs @@ -1,7 +1,6 @@ use std::borrow::Cow; use tui::{ - backend::Backend, layout::{Constraint, Direction, Layout, Rect}, symbols::Marker, terminal::Frame, @@ -22,9 +21,7 @@ const AVG_POSITION: usize = 1; const ALL_POSITION: usize = 0; impl Painter { - pub fn draw_cpu<B: Backend>( - &self, f: &mut Frame<'_, B>, app_state: &mut App, draw_loc: Rect, widget_id: u64, - ) { + pub fn draw_cpu(&self, f: &mut Frame<'_>, app_state: &mut App, draw_loc: Rect, widget_id: u64) { let legend_width = (draw_loc.width as f64 * 0.15) as u16; if legend_width < 6 { @@ -175,8 +172,8 @@ impl Painter { } } - fn draw_cpu_graph<B: Backend>( - &self, f: &mut Frame<'_, B>, app_state: &mut App, draw_loc: Rect, widget_id: u64, + fn draw_cpu_graph( + &self, f: &mut Frame<'_>, app_state: &mut App, draw_loc: Rect, widget_id: u64, ) { const Y_BOUNDS: [f64; 2] = [0.0, 100.5]; const Y_LABELS: [Cow<'static, str>; 2] = [Cow::Borrowed(" 0%"), Cow::Borrowed("100%")]; @@ -240,8 +237,8 @@ impl Painter { } } - fn draw_cpu_legend<B: Backend>( - &self, f: &mut Frame<'_, B>, app_state: &mut App, draw_loc: Rect, widget_id: u64, + fn draw_cpu_legend( + &self, f: &mut Frame<'_>, app_state: &mut App, draw_loc: Rect, widget_id: u64, ) { let recalculate_column_widths = app_state.should_get_widget_bounds(); if let Some(cpu_widget_state) = app_state |