Skip to content

Commit 22793b8

Browse files
jieyouxugitbot
authored and
gitbot
committed
Rollup merge of rust-lang#134819 - ChrisDenton:trunc, r=Mark-Simulacrum
Fix mistake in windows file open In rust-lang#134722 this should have been `c::FileAllocationInfo` not `c::FileEndOfFileInfo`. Oops.
2 parents d09e786 + bc7ebfb commit 22793b8

File tree

1 file changed

+1
-1
lines changed
  • std/src/sys/pal/windows

1 file changed

+1
-1
lines changed

std/src/sys/pal/windows/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ impl File {
323323
let alloc = c::FILE_ALLOCATION_INFO { AllocationSize: 0 };
324324
let result = c::SetFileInformationByHandle(
325325
handle.as_raw_handle(),
326-
c::FileEndOfFileInfo,
326+
c::FileAllocationInfo,
327327
(&raw const alloc).cast::<c_void>(),
328328
mem::size_of::<c::FILE_ALLOCATION_INFO>() as u32,
329329
);

0 commit comments

Comments
 (0)