use File::options()
instead of File::create()
This commit is contained in:
parent
4d45b0745a
commit
06139e57d5
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue