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)?;