Skip to content

Commit

Permalink
chore: Fix new clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pnevyk committed Mar 11, 2022
1 parent 53f300d commit c84446a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/solver/cuckoo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ where
}
}

fn rand_perm<R: Rng + ?Sized>(perm: &mut Vec<usize>, rng: &mut R) {
fn rand_perm<R: Rng + ?Sized>(perm: &mut [usize], rng: &mut R) {
// Based on https://en.wikipedia.org/wiki/Permutation#Algorithms_to_generate_permutations.
for i in 0..perm.len() {
let d = Uniform::new_inclusive(0, i).sample(rng);
Expand Down
1 change: 1 addition & 0 deletions src/solver/trust_region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ where
..
} = self;

#[allow(clippy::needless_late_init)]
let scaled_newton: &mut OVector<F::Scalar, F::Dim>;
let scale_inv2: &mut OVector<F::Scalar, F::Dim>;
let cauchy_scaled: &mut OVector<F::Scalar, F::Dim>;
Expand Down

0 comments on commit c84446a

Please sign in to comment.