From 3dfcb471cbd83b8b49b2d8efdfad9db97853b134 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 12 Aug 2024 18:28:21 -0700 Subject: [PATCH] job: Executable names should be passed as AsRef instead of &str --- src/job.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/job.rs b/src/job.rs index 8bbcc0e..5318d5d 100644 --- a/src/job.rs +++ b/src/job.rs @@ -107,7 +107,7 @@ impl JobManager { pub async fn run_process( &mut self, - executable: &str, + executable: impl AsRef, args: &[impl AsRef], operation_name: &str, ) -> fdo::Result { @@ -176,7 +176,7 @@ impl JobManagerInterface { } impl Job { - async fn spawn(executable: &str, args: &[impl AsRef]) -> Result { + async fn spawn(executable: impl AsRef, args: &[impl AsRef]) -> Result { let child = Command::new(executable).args(args).spawn()?; Ok(Job { process: child,