about summary refs log tree commit diff
path: root/library/std/src/sys/pal/windows
diff options
context:
space:
mode:
authorHTGAzureX1212. <39023054+HTGAzureX1212@users.noreply.github.com>2024-01-26 20:27:20 +0800
committerHTGAzureX1212. <39023054+HTGAzureX1212@users.noreply.github.com>2024-01-26 20:27:20 +0800
commit8f89e57e9f7fe4a2fccf57161aea39a4e48b6a75 (patch)
treedcddfcf5e70973eaa16db108acb2aa51b2bd2ea1 /library/std/src/sys/pal/windows
parent3269513eb0189946c40a67d98724b40321e6e9f3 (diff)
downloadrust-8f89e57e9f7fe4a2fccf57161aea39a4e48b6a75.tar.gz
rust-8f89e57e9f7fe4a2fccf57161aea39a4e48b6a75.zip
remove redundant call to Error::last_os_error
Diffstat (limited to 'library/std/src/sys/pal/windows')
-rw-r--r--library/std/src/sys/pal/windows/fs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/windows/fs.rs b/library/std/src/sys/pal/windows/fs.rs
index 06a08ea22eb..b5976b87be2 100644
--- a/library/std/src/sys/pal/windows/fs.rs
+++ b/library/std/src/sys/pal/windows/fs.rs
@@ -1096,7 +1096,7 @@ pub fn readdir(p: &Path) -> io::Result<ReadDir> {
                 first: Some(wfd),
             })
         } else {
-            Err(Error::last_os_error())
+            Err(last_error)
         }
     }
 }