mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-26 13:54:06 +00:00
use File::options()
instead of File::create()
This commit is contained in:
parent
4d45b0745a
commit
06139e57d5
@ -193,7 +193,7 @@ impl FileEncoder {
|
||||
// shaves an instruction off those code paths (on x86 at least).
|
||||
assert!(capacity <= usize::MAX - max_leb128_len());
|
||||
|
||||
let file = File::create(path)?;
|
||||
let file = File::options().read(true).write(true).create(true).truncate(true).open(path)?;
|
||||
|
||||
Ok(FileEncoder {
|
||||
buf: Box::new_uninit_slice(capacity),
|
||||
|
Loading…
Reference in New Issue
Block a user