diff options
| author | Dan Gohman <dev@sunfishcode.online> | 2021-09-09 14:44:54 -0700 |
|---|---|---|
| committer | Dan Gohman <dev@sunfishcode.online> | 2021-09-09 14:44:54 -0700 |
| commit | 622dfcceb9328b359e28adaec8192390e494ca1e (patch) | |
| tree | 42b83f5d982e1209b8f822cff767930b766ae31a /library/std/src/sys | |
| parent | 18c14add399c35153883f8b84a2e11a7c22f6721 (diff) | |
| download | rust-622dfcceb9328b359e28adaec8192390e494ca1e.tar.gz rust-622dfcceb9328b359e28adaec8192390e494ca1e.zip | |
Fix Windows compilation errors.
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/windows/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/windows/net.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/fs.rs b/library/std/src/sys/windows/fs.rs index 08ff35361f4..34455b7e316 100644 --- a/library/std/src/sys/windows/fs.rs +++ b/library/std/src/sys/windows/fs.rs @@ -455,7 +455,7 @@ impl File { } pub fn duplicate(&self) -> io::Result<File> { - Ok(Self(self.0.try_clone()?)) + Ok(Self { handle: self.handle.try_clone()? }) } fn reparse_point<'a>( diff --git a/library/std/src/sys/windows/net.rs b/library/std/src/sys/windows/net.rs index 681875985bd..39417baebd4 100644 --- a/library/std/src/sys/windows/net.rs +++ b/library/std/src/sys/windows/net.rs @@ -208,7 +208,7 @@ impl Socket { } pub fn duplicate(&self) -> io::Result<Socket> { - Ok(Self(self.0.duplicate()?)) + Ok(Self(self.0.try_clone()?)) } fn recv_with_flags(&self, buf: &mut [u8], flags: c_int) -> io::Result<usize> { |
