diff options
author | Yuri Astrakhan <yuriastrakhan@gmail.com> | 2023-10-23 23:53:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-23 23:53:08 -0400 |
commit | 712a0036811d1ec1f676b2ba76fff4bf5cc5fa97 (patch) | |
tree | 860cc379a2b003c74bff0b30836480b366bed2e1 | |
parent | 1e16456d5f7bedc9dfc1148991353011243831cf (diff) |
Chore: Remove un-needed lifetimes in a few calls (#1309)
-rw-r--r-- | src/components/data_table.rs | 6 | ||||
-rw-r--r-- | src/components/data_table/data_type.rs | 2 | ||||
-rw-r--r-- | src/components/data_table/sortable.rs | 6 | ||||
-rw-r--r-- | src/widgets/cpu_graph.rs | 2 | ||||
-rw-r--r-- | src/widgets/disk_table.rs | 2 | ||||
-rw-r--r-- | src/widgets/process_table/proc_widget_data.rs | 2 | ||||
-rw-r--r-- | src/widgets/process_table/sort_table.rs | 4 | ||||
-rw-r--r-- | src/widgets/temperature_table.rs | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/src/components/data_table.rs b/src/components/data_table.rs index 650e14a5..5fb5cb2c 100644 --- a/src/components/data_table.rs +++ b/src/components/data_table.rs @@ -155,9 +155,9 @@ mod test { } impl DataToCell<&'static str> for TestType { - fn to_cell<'a>( - &'a self, _column: &&'static str, _calculated_width: u16, - ) -> Option<tui::text::Text<'a>> { + fn to_cell( + &self, _column: &&'static str, _calculated_width: u16, + ) -> Option<tui::text::Text<'_>> { None } diff --git a/src/components/data_table/data_type.rs b/src/components/data_table/data_type.rs index 6fad3196..bbfceb8c 100644 --- a/src/components/data_table/data_type.rs +++ b/src/components/data_table/data_type.rs @@ -8,7 +8,7 @@ where H: ColumnHeader, { /// Given data, a column, and its corresponding width, return what should be displayed in the [`DataTable`](super::DataTable). - fn to_cell<'a>(&'a self, column: &H, calculated_width: u16) -> Option<Text<'a>>; + fn to_cell(&self, column: &H, calculated_width: u16) -> Option<Text<'_>>; /// Apply styling to the generated [`Row`] of cells. /// diff --git a/src/components/data_table/sortable.rs b/src/components/data_table/sortable.rs index 28262358..b44906a4 100644 --- a/src/components/data_table/sortable.rs +++ b/src/components/data_table/sortable.rs @@ -359,9 +359,9 @@ mod test { } impl DataToCell<ColumnType> for TestType { - fn to_cell<'a>( - &'a self, _column: &ColumnType, _calculated_width: u16, - ) -> Option<tui::text::Text<'a>> { + fn to_cell( + &self, _column: &ColumnType, _calculated_width: u16, + ) -> Option<tui::text::Text<'_>> { None } diff --git a/src/widgets/cpu_graph.rs b/src/widgets/cpu_graph.rs index 46ec1fc4..2b555c10 100644 --- a/src/widgets/cpu_graph.rs +++ b/src/widgets/cpu_graph.rs @@ -76,7 +76,7 @@ impl CpuWidgetTableData { } impl DataToCell<CpuWidgetColumn> for CpuWidgetTableData { - fn to_cell<'a>(&'a self, column: &CpuWidgetColumn, calculated_width: u16) -> Option<Text<'a>> { + fn to_cell(&self, column: &CpuWidgetColumn, calculated_width: u16) -> Option<Text<'_>> { const CPU_TRUNCATE_BREAKPOINT: u16 = 5; // This is a bit of a hack, but apparently we can avoid having to do any fancy checks diff --git a/src/widgets/disk_table.rs b/src/widgets/disk_table.rs index e0927746..45549e13 100644 --- a/src/widgets/disk_table.rs +++ b/src/widgets/disk_table.rs @@ -126,7 +126,7 @@ impl ColumnHeader for DiskWidgetColumn { } impl DataToCell<DiskWidgetColumn> for DiskWidgetData { - fn to_cell<'a>(&'a self, column: &DiskWidgetColumn, calculated_width: u16) -> Option<Text<'a>> { + fn to_cell(&self, column: &DiskWidgetColumn, calculated_width: u16) -> Option<Text<'_>> { if calculated_width == 0 { return None; } diff --git a/src/widgets/process_table/proc_widget_data.rs b/src/widgets/process_table/proc_widget_data.rs index a466f58d..925bbe65 100644 --- a/src/widgets/process_table/proc_widget_data.rs +++ b/src/widgets/process_table/proc_widget_data.rs @@ -269,7 +269,7 @@ impl ProcWidgetData { } impl DataToCell<ProcColumn> for ProcWidgetData { - fn to_cell<'a>(&'a self, column: &ProcColumn, calculated_width: u16) -> Option<Text<'a>> { + fn to_cell(&self, column: &ProcColumn, calculated_width: u16) -> Option<Text<'_>> { if calculated_width == 0 { return None; } diff --git a/src/widgets/process_table/sort_table.rs b/src/widgets/process_table/sort_table.rs index 0a0e1e1c..30adb753 100644 --- a/src/widgets/process_table/sort_table.rs +++ b/src/widgets/process_table/sort_table.rs @@ -16,7 +16,7 @@ impl ColumnHeader for SortTableColumn { } impl DataToCell<SortTableColumn> for &'static str { - fn to_cell<'a>(&'a self, _column: &SortTableColumn, calculated_width: u16) -> Option<Text<'a>> { + fn to_cell(&self, _column: &SortTableColumn, calculated_width: u16) -> Option<Text<'_>> { if calculated_width == 0 { return None; } @@ -33,7 +33,7 @@ impl DataToCell<SortTableColumn> for &'static str { } impl DataToCell<SortTableColumn> for Cow<'static, str> { - fn to_cell<'a>(&'a self, _column: &SortTableColumn, calculated_width: u16) -> Option<Text<'a>> { + fn to_cell(&self, _column: &SortTableColumn, calculated_width: u16) -> Option<Text<'_>> { if calculated_width == 0 { return None; } diff --git a/src/widgets/temperature_table.rs b/src/widgets/temperature_table.rs index 85d3b85d..1c8fe67c 100644 --- a/src/widgets/temperature_table.rs +++ b/src/widgets/temperature_table.rs @@ -48,7 +48,7 @@ impl TempWidgetData { } impl DataToCell<TempWidgetColumn> for TempWidgetData { - fn to_cell<'a>(&'a self, column: &TempWidgetColumn, calculated_width: u16) -> Option<Text<'a>> { + fn to_cell(&self, column: &TempWidgetColumn, calculated_width: u16) -> Option<Text<'_>> { if calculated_width == 0 { return None; } |