-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Conversation
…n remove_programs_with_no_entries() already.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #34318 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 819 819
Lines 220228 220219 -9
=========================================
- Hits 180535 180521 -14
- Misses 39693 39698 +5 |
*second_level = second_level | ||
.iter() | ||
.filter(|entry| entry.deployment_slot != slot) | ||
.cloned() | ||
.collect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a open-coded vec retain, i.e. could be second_level.retain(|entry| entry.deployment_slot != slot);
8d60aca
to
04af227
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
* Removes retain() from prune_by_deployment_slot() as that is covered in remove_programs_with_no_entries() already. * Removes remove_programs_with_no_entries() from sort_and_unload(). * Fixes ix_usage_counter in LoadedProgram::to_unloaded(). * Fixes doc comment of LoadedProgram::ix_usage_counter. * Removes unused num_total_programs from test_eviction(). * Replaces .as_ref() in lambda with std::option::Option::as_ref. * Replaces .for_each() with a for-loop. * Uses .retain() instead of iter().filter().cloned().collect(). (cherry picked from commit cf0c52c)
Cleanup - program runtime (#34318) * Removes retain() from prune_by_deployment_slot() as that is covered in remove_programs_with_no_entries() already. * Removes remove_programs_with_no_entries() from sort_and_unload(). * Fixes ix_usage_counter in LoadedProgram::to_unloaded(). * Fixes doc comment of LoadedProgram::ix_usage_counter. * Removes unused num_total_programs from test_eviction(). * Replaces .as_ref() in lambda with std::option::Option::as_ref. * Replaces .for_each() with a for-loop. * Uses .retain() instead of iter().filter().cloned().collect(). (cherry picked from commit cf0c52c) Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
The program runtime crate was reviewed, this PR addresses the informational points.