Skip to content

Commit

Permalink
Fix two clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Mar 3, 2024
1 parent e556a3b commit 2a56cce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pineappl/src/evolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl AlphasTable {
})
.collect();
// UNWRAP: if we can't sort numbers the grid is fishy
ren1.sort_by(|a, b| a.partial_cmp(b).unwrap());
ren1.sort_by(|a, b| a.partial_cmp(b).unwrap_or_else(|| unreachable!()));
ren1.dedup();
let ren1 = ren1;
let alphas: Vec<_> = ren1.iter().map(|&mur2| alphas(mur2)).collect();
Expand All @@ -168,8 +168,7 @@ fn gluon_has_pid_zero(grid: &Grid) -> bool {
&& grid
.key_values()
.and_then(|key_values| key_values.get("lumi_id_types"))
.map(|value| value == "pdg_mc_ids")
.unwrap_or(true)
.map_or(true, |value| value == "pdg_mc_ids")
}

type Pid01IndexTuples = Vec<(usize, usize)>;
Expand Down

0 comments on commit 2a56cce

Please sign in to comment.