From 83425a9c56c59473650cc3cdc0bd5fce22138cf5 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Wed, 6 Nov 2024 22:03:33 +0100 Subject: [PATCH] clippy: elide lifetimes --- Cargo.toml | 2 +- src/expression.rs | 2 +- src/variable.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index be23a8e..92900cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "good_lp" -version = "1.9.0" +version = "1.10.0" authors = ["Ophir LOJKINE "] edition = "2018" repository = "https://github.com/rust-or/good_lp" diff --git a/src/expression.rs b/src/expression.rs index bd73106..7496fc2 100644 --- a/src/expression.rs +++ b/src/expression.rs @@ -26,7 +26,7 @@ impl IntoAffineExpression for LinearExpression { #[doc(hidden)] pub struct CopiedCoefficients<'a>(std::collections::hash_map::Iter<'a, Variable, f64>); -impl<'a> Iterator for CopiedCoefficients<'a> { +impl Iterator for CopiedCoefficients<'_> { type Item = (Variable, f64); #[inline] diff --git a/src/variable.rs b/src/variable.rs index 2c9b4f0..8626eef 100644 --- a/src/variable.rs +++ b/src/variable.rs @@ -69,7 +69,7 @@ impl IntoAffineExpression for Option { } } -impl<'a> IntoAffineExpression for &'a Variable { +impl IntoAffineExpression for &Variable { type Iter = std::iter::Once<(Variable, f64)>; #[inline] @@ -412,7 +412,7 @@ struct DisplayExpr<'a, 'b, V> { value: &'b V, } -impl<'a, 'b, V: FormatWithVars> Display for DisplayExpr<'a, 'b, V> { +impl Display for DisplayExpr<'_, '_, V> { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { self.value.format_with(f, |f, var| { let mut name = &self.problem.variables[var.index].name;