Skip to content

Commit a18d2a0

Browse files
committed
Increase Rust edition from 2021 to 2024
1 parent 297648f commit a18d2a0

10 files changed

Lines changed: 103 additions & 102 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Starting with this version, PineAPPL has an official logo!
2525
### Changed
2626

2727
- raised MSRV to 1.94.0
28+
- raised Rust edition to 2024
2829

2930
## [1.3.3] - 01/03/2026
3031

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resolver = "2"
1717

1818
[workspace.package]
1919
categories = ["science"]
20-
edition = "2021"
20+
edition = "2024"
2121
keywords = ["high-energy-physics", "physics"]
2222
license = "GPL-3.0-or-later"
2323
repository = "https://github.com/NNPDF/pineappl"

pineappl/src/packed_array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<T: Copy + Default + PartialEq> PackedArray<T> {
145145

146146
for ((i, j, k), &entry) in array
147147
.indexed_iter()
148-
.filter(|(_, &entry)| entry != Default::default())
148+
.filter(|&(_, &entry)| entry != Default::default())
149149
{
150150
result[[i + xstart, j, k]] = entry;
151151
}
@@ -161,7 +161,7 @@ impl<T: Copy + Default + PartialEq> From<ArrayViewD<'_, T>> for PackedArray<T> {
161161
for (i, &entry) in array
162162
.iter()
163163
.enumerate()
164-
.filter(|(_, &entry)| entry != Default::default())
164+
.filter(|&(_, &entry)| entry != Default::default())
165165
{
166166
result[i] = entry;
167167
}

pineappl/tests/drell_yan_lo.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ fn hadronic_pspgen(rng: &mut impl Rng, mmin: f64, mmax: f64) -> Psp2to2 {
8989

9090
let mut jacobian = 1.0;
9191

92-
let r1 = rng.gen::<f64>();
93-
let r2 = rng.gen::<f64>();
92+
let r1 = rng.r#gen::<f64>();
93+
let r2 = rng.r#gen::<f64>();
9494
let tau0 = smin / smax;
9595
let tau = tau0.powf(r1);
9696
let y = tau.powf(1.0 - r2);
@@ -100,7 +100,7 @@ fn hadronic_pspgen(rng: &mut impl Rng, mmin: f64, mmax: f64) -> Psp2to2 {
100100
jacobian *= tau * tau0.ln().powi(2) * r1;
101101

102102
// theta integration (in the CMS)
103-
let cos_theta = rng.gen::<f64>().mul_add(2.0, -1.0);
103+
let cos_theta = rng.r#gen::<f64>().mul_add(2.0, -1.0);
104104
jacobian *= 2.0;
105105

106106
let t = -0.5 * s * (1.0 - cos_theta);

pineappl_applgrid/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ version.workspace = true
1616
workspace = true
1717

1818
[dependencies]
19-
cxx = "1.0.65"
19+
cxx = "1.0.130"
2020
lhapdf = { package = "managed-lhapdf", version = "0.3.4" }
2121

2222
[build-dependencies]
2323
cc = "1.0.49"
24-
cxx-build = "1.0.65"
24+
cxx-build = "1.0.130"
2525
pkg-config = "0.3.26"
2626

2727
[features]

0 commit comments

Comments
 (0)