mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
process: upgrade Command::spawn_with to use FnOnce (#7511)
This commit is contained in:
@@ -933,7 +933,7 @@ impl Command {
|
||||
#[inline]
|
||||
pub fn spawn_with(
|
||||
&mut self,
|
||||
with: impl Fn(&mut StdCommand) -> io::Result<StdChild>,
|
||||
with: impl FnOnce(&mut StdCommand) -> io::Result<StdChild>,
|
||||
) -> io::Result<Child> {
|
||||
// On two lines to circumvent a mutable borrow check failure.
|
||||
let child = with(&mut self.std)?;
|
||||
|
||||
Reference in New Issue
Block a user