From 3ea807879eed406cc847a444cabdb971786eb149 Mon Sep 17 00:00:00 2001 From: Pistonight Date: Sun, 3 Aug 2025 10:56:14 -0700 Subject: [PATCH] fix(process): upgrade Command::spawn_with to use FnOnce --- tokio/src/process/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/process/mod.rs b/tokio/src/process/mod.rs index bff20fcd20c..4e1bd2a700e 100644 --- a/tokio/src/process/mod.rs +++ b/tokio/src/process/mod.rs @@ -933,7 +933,7 @@ impl Command { #[inline] pub fn spawn_with( &mut self, - with: impl Fn(&mut StdCommand) -> io::Result, + with: impl FnOnce(&mut StdCommand) -> io::Result, ) -> io::Result { // On two lines to circumvent a mutable borrow check failure. let child = with(&mut self.std)?;