Skip to content

Commit d0cfb35

Browse files
committed
Fix two clippy lints
1 parent 97c13bd commit d0cfb35

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

pineappl/src/convolutions.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,15 @@ impl<'a> ConvolutionCache<'a> {
133133
}
134134
})
135135
// TODO: convert `unwrap` to `Err`
136-
.unwrap()
136+
.unwrap_or_else(|| {
137+
panic!(
138+
"couldn't match {grid_conv:?} with a convolution function from cache {:?}",
139+
self.caches
140+
.iter()
141+
.map(|cache| cache.conv.clone())
142+
.collect::<Vec<_>>()
143+
)
144+
})
137145
})
138146
.collect();
139147

pineappl/src/grid.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,8 +1637,7 @@ mod tests {
16371637
];
16381638
let mut ar = PackedArray::new(vec![1, 10, 10]);
16391639
ar[[0, 0, 0]] = 0.;
1640-
let sg: SubgridEnum =
1641-
ImportSubgridV1::new(ar, vec![vec![0.0], x.clone(), x.clone()]).into();
1640+
let sg: SubgridEnum = ImportSubgridV1::new(ar, vec![vec![0.0], x.clone(), x]).into();
16421641
grid.subgrids_mut()[[0, 0, 0]] = sg;
16431642
let was_repaired = grid.repair();
16441643
assert!(was_repaired);

0 commit comments

Comments
 (0)