Skip to content

Commit 6ca70d8

Browse files
committed
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.
1 parent 408585e commit 6ca70d8

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)