Skip to content

Commit

Permalink
Fix clippy::useless_conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyBF authored and dalcde committed Feb 11, 2023
1 parent 57224e8 commit 16a0df9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ext/crates/once/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ impl<T> OnceVec<T> {
inner_index(len - 1).0 + 1
};

(0..page_end).into_iter().flat_map(move |page| unsafe {
(0..page_end).flat_map(move |page| unsafe {
// Safety: tautological
self.page(page).as_slice(len, page)
})
Expand Down
2 changes: 1 addition & 1 deletion ext/src/chain_complex/chain_homotopy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ impl<
};

#[cfg(not(feature = "concurrent"))]
let scratches: Vec<FpVector> = (0..num_gens).into_iter().map(f).collect();
let scratches: Vec<FpVector> = (0..num_gens).map(f).collect();

#[cfg(feature = "concurrent")]
let scratches: Vec<FpVector> = (0..num_gens).into_par_iter().map(f).collect();
Expand Down
5 changes: 1 addition & 4 deletions ext/src/resolution_homomorphism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,7 @@ where
};

#[cfg(not(feature = "concurrent"))]
let fdx_vectors: Vec<FpVector> = (0..num_gens)
.into_iter()
.filter_map(compute_fdx_vector)
.collect();
let fdx_vectors: Vec<FpVector> = (0..num_gens).filter_map(compute_fdx_vector).collect();

#[cfg(feature = "concurrent")]
let fdx_vectors: Vec<FpVector> = (0..num_gens)
Expand Down
3 changes: 1 addition & 2 deletions ext/src/secondary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,7 @@ pub trait SecondaryLift: Sync {
.collect();

#[cfg(not(feature = "concurrent"))]
let mut intermediates: Vec<FpVector> =
(0..num_gens).into_iter().map(get_intermediate).collect();
let mut intermediates: Vec<FpVector> = (0..num_gens).map(get_intermediate).collect();

let mut results = vec![FpVector::new(p, target_dim); num_gens];

Expand Down

0 comments on commit 16a0df9

Please sign in to comment.