Skip to content

Commit 0d8c33f

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 d5b4c2e commit 0d8c33f

File tree

1 file changed

+0
-1
lines changed
  • library/std/src/sys/pal/windows

1 file changed

+0
-1
lines changed

library/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)