Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Feb 12, 2024
1 parent 726320c commit dcf142b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/collision/broad_phase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ fn sweep_and_prune(
/// Sorts a list iteratively using comparisons. In an ascending sort order, when a smaller value is encountered, it is moved lower in the list until it is larger than the item before it.
///
/// This is relatively slow for large lists, but very efficient in cases where the list is already mostly sorted.
fn insertion_sort<T>(items: &mut Vec<T>, comparison: fn(&T, &T) -> bool) {
fn insertion_sort<T>(items: &mut [T], comparison: fn(&T, &T) -> bool) {
for i in 1..items.len() {
let mut j = i;
while j > 0 && comparison(&items[j - 1], &items[j]) {
Expand Down

0 comments on commit dcf142b

Please sign in to comment.