Rollup merge of #139295 - JakeWharton:jw.duplicate-anon-pipe.2025-04-02, r=joboet

Remove creation of duplicate `AnonPipe`

The `File` is unwrapped to a `Handle` into an `AnonPipe`, and then that `AnonPipe` was unwrapped to a `Handle` into another `AnonPipe`. The second operation is entirely redundant.
This commit is contained in:
Matthias Krüger
2025-04-04 08:02:06 +02:00
committed by GitHub
-1
View File
@@ -143,7 +143,6 @@ pub fn anon_pipe(ours_readable: bool, their_handle_inheritable: bool) -> io::Res
};
opts.security_attributes(&mut sa);
let theirs = File::open(Path::new(&name), &opts)?;
let theirs = AnonPipe { inner: theirs.into_inner() };
Ok(Pipes {
ours: AnonPipe { inner: ours },