about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Denton <chris@chrisdenton.dev>2025-01-21 17:27:24 +0000
committerJosh Stone <jistone@redhat.com>2025-01-25 16:48:11 -0800
commit5f5e70bfc6391374546a2fd240d8612717af69f4 (patch)
tree3c0da4caacd3e40e929d13c718d8689c5669325b
parente92addfac403a4f6904587fd86d45c3f5336ce24 (diff)
downloadrust-5f5e70bfc6391374546a2fd240d8612717af69f4.tar.gz
rust-5f5e70bfc6391374546a2fd240d8612717af69f4.zip
Remove test panic from File::open
(cherry picked from commit fed5f98c47e64bc5e96679165d16e5eec8b4917e)
-rw-r--r--library/std/src/sys/pal/windows/fs.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/library/std/src/sys/pal/windows/fs.rs b/library/std/src/sys/pal/windows/fs.rs
index b3659351b8c..f8493c21ad4 100644
--- a/library/std/src/sys/pal/windows/fs.rs
+++ b/library/std/src/sys/pal/windows/fs.rs
@@ -328,9 +328,6 @@ impl File {
                         mem::size_of::<c::FILE_ALLOCATION_INFO>() as u32,
                     );
                     if result == 0 {
-                        if api::get_last_error().code != 0 {
-                            panic!("FILE_ALLOCATION_INFO failed!!!");
-                        }
                         let eof = c::FILE_END_OF_FILE_INFO { EndOfFile: 0 };
                         let result = c::SetFileInformationByHandle(
                             handle.as_raw_handle(),