diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-12-27 20:44:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-27 20:44:15 +0800 |
| commit | 5544091054f6496b7e98258cc3725e3e7ef1fc26 (patch) | |
| tree | fdd3e52925db058b40a492db8aab164136263170 | |
| parent | f65dc4f3759222b7cb7c73dfd1542dc16750d082 (diff) | |
| parent | 0af396f183b815be2b9905faee499c5cddf1c0b9 (diff) | |
Rollup merge of #134819 - ChrisDenton:trunc, r=Mark-Simulacrum
Fix mistake in windows file open In #134722 this should have been `c::FileAllocationInfo` not `c::FileEndOfFileInfo`. Oops.
| -rw-r--r-- | library/std/src/sys/pal/windows/fs.rs | 2 |
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 dda4259919b..553049099fc 100644 --- a/library/std/src/sys/pal/windows/fs.rs +++ b/library/std/src/sys/pal/windows/fs.rs @@ -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, ); |
