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:
Clement Tsang 2022-03-07 18:44:45 -05:00 committed by GitHub
parent 57e1a8285e
commit e682882aee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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());