if you intend to overwrite an existing file entirely, call .truncate(true) if you instead know that you may want to keep some parts of the old file, call .truncate(false) alternatively, use .append(true) to append to the file instead of overwriting it for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options#[warn(clippy::suspicious_open_options)] on by default
As stated by clippy:
if you intend to overwrite an existing file entirely, call
.truncate(true)
if you instead know that you may want to keep some parts of the old file, call.truncate(false)
alternatively, use.append(true)
to append to the file instead of overwriting it for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options#[warn(clippy::suspicious_open_options)]
on by default