other: fix clippy lints on vector reference params (#689)
Fixes a few clippy lints around function parameters and using slices over vector references.
This commit is contained in:
parent
57e1a8285e
commit
e682882aee
|
@ -70,7 +70,7 @@ fn is_temp_filtered(filter: &Option<Filter>, text: &str) -> bool {
|
|||
}
|
||||
}
|
||||
|
||||
fn temp_vec_sort(temperature_vec: &mut Vec<TempHarvest>) {
|
||||
fn temp_vec_sort(temperature_vec: &mut [TempHarvest]) {
|
||||
// By default, sort temperature, then by alphabetically!
|
||||
// TODO: [TEMPS] Allow users to control this.
|
||||
|
||||
|
|
|
@ -882,7 +882,7 @@ pub fn tree_process_data(
|
|||
}
|
||||
|
||||
fn sort_vec(
|
||||
to_sort_vec: &mut Vec<(Pid, &ConvertedProcessData)>, sort_type: &ProcessSorting,
|
||||
to_sort_vec: &mut [(Pid, &ConvertedProcessData)], sort_type: &ProcessSorting,
|
||||
is_sort_descending: bool,
|
||||
) {
|
||||
// Sort by PID first (descending)
|
||||
|
|
|
@ -467,7 +467,7 @@ fn update_final_process_list(app: &mut App, widget_id: u64) {
|
|||
}
|
||||
|
||||
fn sort_process_data(
|
||||
to_sort_vec: &mut Vec<ConvertedProcessData>, proc_widget_state: &app::ProcWidgetState,
|
||||
to_sort_vec: &mut [ConvertedProcessData], proc_widget_state: &app::ProcWidgetState,
|
||||
) {
|
||||
to_sort_vec.sort_by_cached_key(|c| c.name.to_lowercase());
|
||||
|
||||
|
|
Loading…
Reference in New Issue