about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-04 08:02:06 +0200
committerGitHub <noreply@github.com>2025-04-04 08:02:06 +0200
commitf701a5cc38b6d36a6002343a1925cc228355ae16 (patch)
treedb981a9b02db8fcf42c89add3d2faf9ccb898dbe
parent66e61c78e7496def7a7083894af87877a2af1da9 (diff)
parent0d8c33f6f14c2a2e0ce03d82b313006e84b7a9c2 (diff)
downloadrust-f701a5cc38b6d36a6002343a1925cc228355ae16.tar.gz
rust-f701a5cc38b6d36a6002343a1925cc228355ae16.zip
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.
-rw-r--r--library/std/src/sys/pal/windows/pipe.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/windows/pipe.rs b/library/std/src/sys/pal/windows/pipe.rs
index c7852464922..7fd62339619 100644
--- a/library/std/src/sys/pal/windows/pipe.rs
+++ b/library/std/src/sys/pal/windows/pipe.rs
@@ -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 },