about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJake Wharton <jw@squareup.com>2025-04-02 23:03:55 -0400
committerJake Wharton <jw@squareup.com>2025-04-02 23:03:55 -0400
commit0d8c33f6f14c2a2e0ce03d82b313006e84b7a9c2 (patch)
treefa3f67672812e41ee32725335432a7f0614b573b
parentd5b4c2e4f19b6d7037371cdaecc3cc2c701c68df (diff)
downloadrust-0d8c33f6f14c2a2e0ce03d82b313006e84b7a9c2.tar.gz
rust-0d8c33f6f14c2a2e0ce03d82b313006e84b7a9c2.zip
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 },