Skip to content

Commit

Permalink
Fix some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Oct 13, 2023
1 parent b7872a7 commit 6ab3a6b
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions pineappl_cli/src/evolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ mod eko {
.pids
.iter()
.copied()
.zip(factors.into_iter())
.zip(factors)
.collect();

// UNWRAP: we assume that an evolution basis is specified, if
Expand Down Expand Up @@ -311,11 +311,8 @@ mod eko {
basis
.into_iter()
.map(|factors| {
let tuples: Vec<_> = BASES_V1_DEFAULT_PIDS
.iter()
.copied()
.zip(factors.into_iter())
.collect();
let tuples: Vec<_> =
BASES_V1_DEFAULT_PIDS.iter().copied().zip(factors).collect();

// UNWRAP: we assume that an evolution basis is specified, if that's
// not the case we must make the algorithm more generic
Expand Down Expand Up @@ -388,6 +385,15 @@ mod eko {
}
}

impl<'a> IntoIterator for &'a mut EkoSlices {
type Item = Result<(OperatorSliceInfo, Array4<f64>)>;
type IntoIter = EkoSlicesIter<'a>;

fn into_iter(self) -> Self::IntoIter {
self.iter_mut()
}
}

pub enum EkoSlicesIter<'a> {
V0 {
info: OperatorSliceInfo,
Expand Down Expand Up @@ -421,8 +427,8 @@ mod eko {
info,
entries,
} => {
let mut fun = || {
while let Some(entry) = entries.next() {
let fun = || {
for entry in entries {
let entry = entry?;
let path = entry.path()?;

Expand Down

0 comments on commit 6ab3a6b

Please sign in to comment.