Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
skailasa committed Jan 11, 2024
1 parent 291da20 commit 8d0e207
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions fmm/src/field_translation/source_to_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ pub mod uniform {

let level_locals = self.level_locals[level as usize]
.iter()
.map(|l| Mutex::new(l))
.map(Mutex::new)
.collect_vec();

(0..316).into_par_iter().for_each(|c_idx| {
Expand Down Expand Up @@ -619,7 +619,7 @@ pub mod uniform {

let level_locals = self.level_locals[level as usize]
.iter()
.map(|inner_vec| Mutex::new(inner_vec))
.map(Mutex::new)
.collect_vec();

(0..316).into_par_iter().for_each(|c_idx| {
Expand Down Expand Up @@ -652,8 +652,6 @@ pub mod uniform {
if save_idx > -1 {
let save_idx = save_idx as usize;
for charge_vec_idx in 0..self.ncharge_vectors {
// let local_ptr =
// self.level_locals[level as usize][save_idx][charge_vec_idx].raw;
let local_lock = level_locals[save_idx].lock().unwrap();
let local_send_ptr = local_lock[charge_vec_idx];
let local_ptr = local_send_ptr.raw;
Expand Down
8 changes: 4 additions & 4 deletions fmm/src/fmm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ mod test {
test_idx_vec.push(idx);
}
}
let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[3]];
let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[0]];

let leaf_idx = datatree.fmm.tree().get_leaf_index(leaf).unwrap();

Expand Down Expand Up @@ -907,7 +907,7 @@ mod test {
test_idx_vec.push(idx);
}
}
let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[3]];
let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[0]];

let leaf_idx = datatree.fmm.tree().get_leaf_index(leaf).unwrap();

Expand Down Expand Up @@ -950,7 +950,7 @@ mod test {
"rel_error = {rel_error} = {abs_error} / {}",
direct.iter().sum::<f64>()
);
assert!(rel_error <= 1e-3);
assert!(rel_error <= 1e-5);
}

#[allow(clippy::too_many_arguments)]
Expand Down Expand Up @@ -1169,7 +1169,7 @@ mod test {
test_idx_vec.push(idx);
}
}
let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[3]];
let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[0]];

let &leaf_idx = datatree.fmm.tree().get_leaf_index(leaf).unwrap();
let (l, r) = datatree.charge_index_pointer[leaf_idx];
Expand Down

0 comments on commit 8d0e207

Please sign in to comment.