Commit 40ac226
committed
Avoid
Besides the style change done in the previous commit, `clippy` also
identified `File::create_new` is newer than we may wish to rely on:
error: current MSRV (Minimum Supported Rust Version) is `1.76.0` but this item is stable since `1.77.0`
--> tests/tools/src/lib.rs:906:13
|
906 | File::create_new(path)
| ^^^^^^^^^^^^^^^^
This changes that code to use `OpenOptions` instead. This is
simlar to the suggested equivalent code in the `File::create_new`
documentation:
File::options().read(true).write(true).create_new(true).open(...)
But the approach used here differs in that `read(true)` is removed,
since this call is only creating and writing, not reading.File::create_new for compatibility with project MSRV1 parent 2d7abaf commit 40ac226
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
906 | | - | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
907 | 910 | | |
908 | 911 | | |
909 | 912 | | |
| |||
0 commit comments