Rocket/core/lib
Paul Lietar 67ad8316dc 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()`.
2023-12-19 16:01:00 -08:00
..
fuzz Doc, fix, and test 'cli_colors' deserialization. 2023-12-18 16:37:56 -08:00
src Ensure 'TempFile' flushes when persisted. 2023-12-19 16:01:00 -08:00
tests Fix typos. 2023-11-17 17:04:49 +01:00
Cargo.toml Fix min dependency versions. Update MSRV to 1.64. 2023-12-13 17:49:05 -08:00
build.rs Fix min dependency versions. Update MSRV to 1.64. 2023-12-13 17:49:05 -08:00