Skip to content

Commit a439d4f

Browse files
authored
Rollup merge of rust-lang#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.
2 parents a7ffaca + 6ca70d8 commit a439d4f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Diff for: std/src/sys/pal/windows/pipe.rs

-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ pub fn anon_pipe(ours_readable: bool, their_handle_inheritable: bool) -> io::Res
143143
};
144144
opts.security_attributes(&mut sa);
145145
let theirs = File::open(Path::new(&name), &opts)?;
146-
let theirs = AnonPipe { inner: theirs.into_inner() };
147146

148147
Ok(Pipes {
149148
ours: AnonPipe { inner: ours },

0 commit comments

Comments
 (0)