From fa4f90befb44371bc81fb4e96e4f5811a2c5d6ed Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 8 Jun 2026 22:24:59 +0200 Subject: [PATCH] find: fix clippy::unnecessary_wraps --- src/find/matchers/exec.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/find/matchers/exec.rs b/src/find/matchers/exec.rs index a461913..39a1ba2 100644 --- a/src/find/matchers/exec.rs +++ b/src/find/matchers/exec.rs @@ -40,7 +40,7 @@ impl SingleExecMatcher { args: &[&str], exec_in_parent_dir: bool, ) -> Result> { - Self::new_impl(executable, args, exec_in_parent_dir, false) + Ok(Self::new_impl(executable, args, exec_in_parent_dir, false)) } pub fn new_interactive( @@ -48,7 +48,7 @@ impl SingleExecMatcher { args: &[&str], exec_in_parent_dir: bool, ) -> Result> { - Self::new_impl(executable, args, exec_in_parent_dir, true) + Ok(Self::new_impl(executable, args, exec_in_parent_dir, true)) } fn new_impl( @@ -56,15 +56,15 @@ impl SingleExecMatcher { args: &[&str], exec_in_parent_dir: bool, interactive: bool, - ) -> Result> { + ) -> Self { let transformed_args = args.iter().map(|&a| parse_arg(a)).collect(); - Ok(Self { + Self { executable: parse_arg(executable), args: transformed_args, exec_in_parent_dir, interactive, - }) + } } }