From b87ad1e1aa81787ee74c725371ab7f0615bcd0f6 Mon Sep 17 00:00:00 2001
From: Vincent Lafeychine <vincent.lafeychine@proton.me>
Date: Fri, 10 May 2024 12:13:41 +0200
Subject: [PATCH] clippy: Fix impl_trait_in_params

---
 rr_frontend/.cargo/config.toml        | 1 -
 rr_frontend/rrconfig/src/arg_value.rs | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/rr_frontend/.cargo/config.toml b/rr_frontend/.cargo/config.toml
index 9f24d00e..d4db8659 100644
--- a/rr_frontend/.cargo/config.toml
+++ b/rr_frontend/.cargo/config.toml
@@ -32,7 +32,6 @@ rustflags = [
     "-Aclippy::string_lit_as_bytes",
 
     # clippy::restriction
-    "-Aclippy::impl_trait_in_params",
     "-Aclippy::mod_module_files",
     "-Aclippy::non_ascii_literal",
     "-Aclippy::panic_in_result_fn",
diff --git a/rr_frontend/rrconfig/src/arg_value.rs b/rr_frontend/rrconfig/src/arg_value.rs
index 9e00e83f..a50b6c6e 100644
--- a/rr_frontend/rrconfig/src/arg_value.rs
+++ b/rr_frontend/rrconfig/src/arg_value.rs
@@ -10,10 +10,10 @@ use std::ops::Deref;
 
 /// If a command-line option matches `find_arg`, then apply the predicate `pred` on its value. If
 /// true, then return it. The parameter is assumed to be either `--arg=value` or `--arg value`.
-pub fn arg_value<'a, T: Deref<Target = str>>(
+pub fn arg_value<'a, T: Deref<Target = str>, F: Fn(&str) -> bool>(
     args: &'a [T],
     find_arg: &str,
-    pred: impl Fn(&str) -> bool,
+    pred: F,
 ) -> Option<&'a str> {
     let mut args = args.iter().map(Deref::deref);
     while let Some(arg) = args.next() {
-- 
GitLab