diff options
Diffstat (limited to 'src/display/components/header_details.rs')
-rw-r--r-- | src/display/components/header_details.rs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/display/components/header_details.rs b/src/display/components/header_details.rs index 3f68984..373f09e 100644 --- a/src/display/components/header_details.rs +++ b/src/display/components/header_details.rs @@ -1,7 +1,6 @@ use std::time::{Duration, Instant}; use ratatui::{ - backend::Backend, layout::{Alignment, Rect}, style::{Color, Modifier, Style}, terminal::Frame, @@ -42,7 +41,7 @@ pub struct HeaderDetails<'a> { } impl<'a> HeaderDetails<'a> { - pub fn render(&self, frame: &mut Frame<impl Backend>, rect: Rect) { + pub fn render(&self, frame: &mut Frame, rect: Rect) { let bandwidth = self.bandwidth_string(); let color = if self.paused { Color::Yellow @@ -63,13 +62,7 @@ impl<'a> HeaderDetails<'a> { self.render_bandwidth(frame, rect, &bandwidth, color); } - fn render_bandwidth( - &self, - frame: &mut Frame<impl Backend>, - rect: Rect, - bandwidth: &str, - color: Color, - ) { + fn render_bandwidth(&self, frame: &mut Frame, rect: Rect, bandwidth: &str, color: Color) { let bandwidth_text = Span::styled( bandwidth, Style::default().fg(color).add_modifier(Modifier::BOLD), @@ -95,13 +88,7 @@ impl<'a> HeaderDetails<'a> { format!(" Total {t} (Up / Down): {up} / {down}{paused}") } - fn render_elapsed_time( - &self, - frame: &mut Frame<impl Backend>, - rect: Rect, - elapsed_time: &str, - color: Color, - ) { + fn render_elapsed_time(&self, frame: &mut Frame, rect: Rect, elapsed_time: &str, color: Color) { let elapsed_time_text = Span::styled( elapsed_time, Style::default().fg(color).add_modifier(Modifier::BOLD), |