From af02fadc850954ead98d5657e362ec4e0ac95fd2 Mon Sep 17 00:00:00 2001 From: Felix Hekhorn Date: Thu, 30 May 2024 13:01:05 +0300 Subject: [PATCH] Fix clippy warnings --- .../src/anomalous_dimensions/unpolarized/spacelike/as3.rs | 3 +-- crates/ekore/src/bib.rs | 8 +++++++- crates/ekore/src/harmonics/cache.rs | 2 +- crates/ekore/src/harmonics/g_functions.rs | 2 +- crates/make_bib.py | 3 ++- pyproject.toml | 1 + 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs index b43608e01..14354f736 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs @@ -155,8 +155,7 @@ pub fn gamma_nsv(c: &mut Cache, nf: u8) -> Complex { + 46.18 * E2 ); - let result = gamma_nsm(c, nf) + (nf as f64) * ps2; - result + gamma_nsm(c, nf) + (nf as f64) * ps2 } /// Compute the pure-singlet quark-quark anomalous dimension. diff --git a/crates/ekore/src/bib.rs b/crates/ekore/src/bib.rs index 167294b41..75da707bb 100644 --- a/crates/ekore/src/bib.rs +++ b/crates/ekore/src/bib.rs @@ -1,5 +1,6 @@ -//! List of References (autogenerated on 2024-04-25T18:22:43.797877). +//! List of References (autogenerated on 2024-05-30T12:57:15.459698). +#[allow(non_snake_case)] /// The Three loop splitting functions in QCD: The Nonsinglet case /// /// Moch, S. and Vermaseren, J. A. M. and Vogt, A. @@ -11,6 +12,7 @@ /// DOI: [10.1016/j.nuclphysb.2004.03.030](https:dx.doi.org/10.1016/j.nuclphysb.2004.03.030) pub fn Moch2004pa() {} +#[allow(non_snake_case)] /// The Three-loop splitting functions in QCD: The Singlet case /// /// Vogt, A. and Moch, S. and Vermaseren, J. A. M. @@ -22,6 +24,7 @@ pub fn Moch2004pa() {} /// DOI: [10.1016/j.nuclphysb.2004.04.024](https:dx.doi.org/10.1016/j.nuclphysb.2004.04.024) pub fn Vogt2004mw() {} +#[allow(non_snake_case)] /// Programs for computing the logarithm of the gamma function, and the digamma function, for complex argument /// /// K.S. Kölbig @@ -33,6 +36,7 @@ pub fn Vogt2004mw() {} /// DOI: [https://doi.org/10.1016/0010-4655(72)90012-4](https://doi.org/10.1016/0010-4655(72)90012-4) pub fn KOLBIG1972221() {} +#[allow(non_snake_case)] /// Multi‐precision Laplace transform inversion /// /// Abate, J. and Valkó, P. @@ -44,6 +48,7 @@ pub fn KOLBIG1972221() {} /// DOI: [10.1002/nme.995](https:dx.doi.org/10.1002/nme.995) pub fn Abate() {} +#[allow(non_snake_case)] /// Resummations of Transverse Momentum Distributions /// /// Muselli, Claudio @@ -55,6 +60,7 @@ pub fn Abate() {} /// DOI: [10.13130/muselli-claudio_phd2017-12-01](https:dx.doi.org/10.13130/muselli-claudio_phd2017-12-01) pub fn MuselliPhD() {} +#[allow(non_snake_case)] /// Efficient evolution of unpolarized and polarized parton distributions with QCD-PEGASUS /// /// Vogt, A. diff --git a/crates/ekore/src/harmonics/cache.rs b/crates/ekore/src/harmonics/cache.rs index 0fed95258..1342f5175 100644 --- a/crates/ekore/src/harmonics/cache.rs +++ b/crates/ekore/src/harmonics/cache.rs @@ -87,7 +87,7 @@ pub fn recursive_harmonic_sum( ) -> Complex { let mut fact = Complex::zero(); for i in 1..iterations + 1 { - fact = fact + (1.0 / (n + (i as f64))).powu(weight); + fact += (1.0 / (n + (i as f64))).powu(weight); } base_value + fact } diff --git a/crates/ekore/src/harmonics/g_functions.rs b/crates/ekore/src/harmonics/g_functions.rs index ff0f8789f..cfde9e9ea 100644 --- a/crates/ekore/src/harmonics/g_functions.rs +++ b/crates/ekore/src/harmonics/g_functions.rs @@ -18,7 +18,7 @@ pub fn g3(N: Complex, S1: Complex) -> Complex { let mut g3 = Complex::zero(); for cit in CS.iter().enumerate() { let Nj = N + (cit.0 as f64); - g3 = g3 + (*cit.1) * (ZETA2 - s(S1, N, cit.0, 1) / Nj) / Nj; + g3 += (*cit.1) * (ZETA2 - s(S1, N, cit.0, 1) / Nj) / Nj; } g3 } diff --git a/crates/make_bib.py b/crates/make_bib.py index df5437a04..e758c41ad 100644 --- a/crates/make_bib.py +++ b/crates/make_bib.py @@ -10,7 +10,8 @@ BIBFILE = pathlib.Path(__file__).parent / "ekore" / "refs.bib" # A single entry -ENTRY = """/// {title} +ENTRY = """#[allow(non_snake_case)] +/// {title} /// /// {author} /// diff --git a/pyproject.toml b/pyproject.toml index cbd200cb5..89ef66c71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -137,6 +137,7 @@ rdocs-clean = "rm -rf target/doc/" rtest = "cargo test --workspace" fmtcheck = "cargo fmt --all -- --check" clippy = "cargo clippy --no-deps" +rbib = { "shell" = "python crates/make_bib.py > crates/ekore/src/bib.rs" } [tool.pytest.ini_options] testpaths = ['tests/', 'benchmarks/']