about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorDan Gohman <dev@sunfishcode.online>2022-05-19 06:41:35 -0700
committerDan Gohman <dev@sunfishcode.online>2022-06-15 08:52:42 -0700
commiteb37bbcebc3f6d0981eef892817f3a4570e35907 (patch)
treec99237a936396e781fc985c959cb59098816d822 /library/std/src/sys
parenta4cec9742b7e05c33c84cd75002cd56762f7e33b (diff)
downloadrust-eb37bbcebc3f6d0981eef892817f3a4570e35907.tar.gz
rust-eb37bbcebc3f6d0981eef892817f3a4570e35907.zip
Document that `BorrowedFd` may be used to do a `dup`.
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/windows/handle.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/windows/handle.rs b/library/std/src/sys/windows/handle.rs
index ef9a8bd6900..1e7b6e1eab0 100644
--- a/library/std/src/sys/windows/handle.rs
+++ b/library/std/src/sys/windows/handle.rs
@@ -218,7 +218,7 @@ impl Handle {
         inherit: bool,
         options: c::DWORD,
     ) -> io::Result<Self> {
-        Ok(Self(self.0.duplicate(access, inherit, options)?))
+        Ok(Self(self.0.as_handle().duplicate(access, inherit, options)?))
     }
 
     /// Performs a synchronous read.