From 2403b91d7531ee63886e28e3072d2664e2e81772 Mon Sep 17 00:00:00 2001 From: Michael Zhao <44533763+Pistonight@users.noreply.github.com> Date: Sun, 3 Aug 2025 11:27:37 -0700 Subject: [PATCH] process: upgrade `Command::spawn_with` to use `FnOnce` (#7511) --- 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 bff20fcd2..4e1bd2a70 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)?;