mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
process: upgrade Command::spawn_with
to use FnOnce
(#7511)
This commit is contained in:
parent
f1d3b065b6
commit
2403b91d75
@ -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)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user