Rocket/core/lib
Paul Lietar 52de9a1fa6 Ensure 'TempFile' flushes when persisted.
Tokio's `File::write_all()` method has an unexpected quirk: it doesn't
actually write all the requested content to the file when the returned
future resolves. Instead, the write is attempted and queued. This means
that the `persist()` method can resolve without the data being persisted
to the file system. Subsequent reads of the ostensibly written-to file
can thus fail to contain the expected data.

An call to `flush()` following `write_all()` would circumvent the issue.
Alternatively, calling `fs::write()` actually writes to the file system
before returning and requires fewer lines of code. This commit thus
swaps the call to `write_all()` with `fs::write()`.
2024-01-17 21:53:12 -08:00
..
fuzz Migrate Rocket to Rust 2021 edition. 2022-04-19 18:35:38 -07:00
src Ensure 'TempFile' flushes when persisted. 2024-01-17 21:53:12 -08:00
tests Fix typos. 2023-11-17 16:38:14 +01:00
Cargo.toml Fix min dependency versions. Update MSRV to 1.64. 2024-01-17 21:42:08 -08:00
build.rs Fix min dependency versions. Update MSRV to 1.64. 2024-01-17 21:42:08 -08:00