mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
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:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user