diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2022-03-07 18:44:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-07 18:44:45 -0500 |
commit | e682882aeeb09e721f074bc8545770208c3c5321 (patch) | |
tree | 0c0c4055f3163bf32496ec8c188ed7d59c090905 /src | |
parent | 57e1a8285e8d4c06fc85212a0f2d63b86a8c34d7 (diff) |
other: fix clippy lints on vector reference params (#689)
Fixes a few clippy lints around function parameters and using slices over vector references.
Diffstat (limited to 'src')
-rw-r--r-- | src/app/data_harvester/temperature/mod.rs | 2 | ||||
-rw-r--r-- | src/data_conversion.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/app/data_harvester/temperature/mod.rs b/src/app/data_harvester/temperature/mod.rs index cbd92c04..7d5d247d 100644 --- a/src/app/data_harvester/temperature/mod.rs +++ b/src/app/data_harvester/temperature/mod.rs @@ -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. diff --git a/src/data_conversion.rs b/src/data_conversion.rs index 5aaa9f31..7f9d184c 100644 --- a/src/data_conversion.rs +++ b/src/data_conversion.rs @@ -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()); |