From a25a01fd3fbedc67827455bfe33783c763e45a5e Mon Sep 17 00:00:00 2001 From: Konstantin Malanchev Date: Tue, 3 Dec 2024 15:58:08 -0500 Subject: [PATCH] Fixes from clippy 0.1.83 --- src/features/bazin_fit.rs | 2 +- src/features/linexp_fit.rs | 2 +- src/features/roms.rs | 1 - src/features/villar_fit.rs | 2 +- src/lnerfc.rs | 4 ++-- src/nl_fit/mcmc.rs | 2 +- src/time_series.rs | 4 ++-- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/features/bazin_fit.rs b/src/features/bazin_fit.rs index a4c77df6..74560972 100644 --- a/src/features/bazin_fit.rs +++ b/src/features/bazin_fit.rs @@ -116,7 +116,7 @@ struct Params<'a, T> { external: [T; NPARAMS], } -impl<'a, T> Params<'a, T> +impl Params<'_, T> where T: LikeFloat, { diff --git a/src/features/linexp_fit.rs b/src/features/linexp_fit.rs index eea9198c..8be82b87 100644 --- a/src/features/linexp_fit.rs +++ b/src/features/linexp_fit.rs @@ -114,7 +114,7 @@ struct Params<'a, T> { external: [T; NPARAMS], } -impl<'a, T> Params<'a, T> +impl Params<'_, T> where T: LikeFloat, { diff --git a/src/features/roms.rs b/src/features/roms.rs index c163503a..1f3ffa29 100644 --- a/src/features/roms.rs +++ b/src/features/roms.rs @@ -76,7 +76,6 @@ where #[cfg(test)] #[allow(clippy::unreadable_literal)] #[allow(clippy::excessive_precision)] - mod tests { use super::*; use crate::extractor::FeatureExtractor; diff --git a/src/features/villar_fit.rs b/src/features/villar_fit.rs index c3d030e9..ee21091c 100644 --- a/src/features/villar_fit.rs +++ b/src/features/villar_fit.rs @@ -332,7 +332,7 @@ struct Params<'a, T> { external: [T; NPARAMS], } -impl<'a, T> Params<'a, T> +impl Params<'_, T> where T: LikeFloat, { diff --git a/src/lnerfc.rs b/src/lnerfc.rs index 58faefe1..af597785 100644 --- a/src/lnerfc.rs +++ b/src/lnerfc.rs @@ -1,5 +1,5 @@ -/// Natural logarythm of the error function -/// Manually translated from GNU Scientific Library's log_erfc +//! Natural logarithm of the error function +//! Manually translated from GNU Scientific Library's log_erfc #[allow(clippy::excessive_precision)] const TEN_ROOT6_DBL_EPSILON: f64 = 2.4607833005759251e-02; diff --git a/src/nl_fit/mcmc.rs b/src/nl_fit/mcmc.rs index d2077c9a..e738d3f2 100644 --- a/src/nl_fit/mcmc.rs +++ b/src/nl_fit/mcmc.rs @@ -227,7 +227,7 @@ struct EmceeModel<'b, F, LP, const NPARAMS: usize> { upper: &'b [f32; NPARAMS], } -impl<'b, F, LP, const NPARAMS: usize> Prob for EmceeModel<'b, F, LP, NPARAMS> +impl Prob for EmceeModel<'_, F, LP, NPARAMS> where F: Fn(&Guess) -> f32, LP: Fn(&Guess) -> f32, diff --git a/src/time_series.rs b/src/time_series.rs index b2a99e4d..6172339e 100644 --- a/src/time_series.rs +++ b/src/time_series.rs @@ -160,7 +160,7 @@ where } } -impl<'a, T> From> for DataSample<'a, T> +impl From> for DataSample<'_, T> where T: Float, { @@ -178,7 +178,7 @@ where } } -impl<'a, T> From> for DataSample<'a, T> +impl From> for DataSample<'_, T> where T: Float, {