summary refs log tree commit diff
path: root/library/std/src/sys/windows
diff options
context:
space:
mode:
authorChristiaan Dirkx <christiaan@dirkx.email>2020-11-20 06:14:29 +0100
committerChristiaan Dirkx <christiaan@dirkx.email>2021-04-18 09:29:22 +0200
commit4a15bd8eaff4f749113dc49bbcf877e34593726b (patch)
tree195c4c072b579b9a2939b945a89a184219790d3e /library/std/src/sys/windows
parent9c3b66cff74f3a21dc735294f3df319a38bc2114 (diff)
downloadrust-4a15bd8eaff4f749113dc49bbcf877e34593726b.tar.gz
rust-4a15bd8eaff4f749113dc49bbcf877e34593726b.zip
Add and insta-stabilize `std::io::ErrorKind::NotSupported`
Diffstat (limited to 'library/std/src/sys/windows')
-rw-r--r--library/std/src/sys/windows/fs.rs2
-rw-r--r--library/std/src/sys/windows/net.rs2
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 c6509db80c0..ef68405b103 100644
--- a/library/std/src/sys/windows/fs.rs
+++ b/library/std/src/sys/windows/fs.rs
@@ -802,7 +802,7 @@ pub fn link(original: &Path, link: &Path) -> io::Result<()> {
 
 #[cfg(target_vendor = "uwp")]
 pub fn link(_original: &Path, _link: &Path) -> io::Result<()> {
-    return Err(io::Error::new_const(io::ErrorKind::Other, &"hard link are not supported on UWP"));
+    return Err(io::Error::new_const(io::ErrorKind::NotSupported, &"hard link are not supported on UWP"));
 }
 
 pub fn stat(path: &Path) -> io::Result<FileAttr> {
diff --git a/library/std/src/sys/windows/net.rs b/library/std/src/sys/windows/net.rs
index e50adcb28a4..f6691ccd3e1 100644
--- a/library/std/src/sys/windows/net.rs
+++ b/library/std/src/sys/windows/net.rs
@@ -370,7 +370,7 @@ impl Socket {
 
     #[cfg(target_vendor = "uwp")]
     fn set_no_inherit(&self) -> io::Result<()> {
-        Err(io::Error::new_const(io::ErrorKind::Other, &"Unavailable on UWP"))
+        Err(io::Error::new_const(io::ErrorKind::NotSupported, &"Unavailable on UWP"))
     }
 
     pub fn shutdown(&self, how: Shutdown) -> io::Result<()> {