Skip to content

Commit

Permalink
Rollup merge of rust-lang#134819 - ChrisDenton:trunc, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Fix mistake in windows file open

In rust-lang#134722 this should have been `c::FileAllocationInfo` not `c::FileEndOfFileInfo`. Oops.
  • Loading branch information
jieyouxu authored Dec 27, 2024
2 parents f65dc4f + 0af396f commit 5544091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/windows/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ impl File {
let alloc = c::FILE_ALLOCATION_INFO { AllocationSize: 0 };
let result = c::SetFileInformationByHandle(
handle.as_raw_handle(),
c::FileEndOfFileInfo,
c::FileAllocationInfo,
(&raw const alloc).cast::<c_void>(),
mem::size_of::<c::FILE_ALLOCATION_INFO>() as u32,
);
Expand Down

0 comments on commit 5544091

Please sign in to comment.