Congyuwang / RocksDict

Python fast on-disk dictionary / RocksDB & SpeeDB Python binding
https://congyuwang.github.io/RocksDict/rocksdict.html
MIT License
173 stars 8 forks source link

fix RocksDictConfig save not truncating #117

Closed Congyuwang closed 5 months ago

Congyuwang commented 5 months ago

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