Fix doc for WriteBatch::delete (#376)

The function does nothing if the key is not found in DB. See
1dd7873e08/include/rocksdb/write_batch.h (L85)

Fixes https://github.com/rust-rocksdb/rust-rocksdb/issues/352
master
wqfish 5 years ago committed by Ilya Bogdanov
parent 4f9524bd36
commit aa1aa97163
  1. 4
      src/db.rs

@ -1765,9 +1765,7 @@ impl WriteBatch {
} }
} }
/// Remove the database entry for key. /// Removes the database entry for key. Does nothing if the key was not found.
///
/// Returns an error if the key was not found.
pub fn delete<K: AsRef<[u8]>>(&mut self, key: K) -> Result<(), Error> { pub fn delete<K: AsRef<[u8]>>(&mut self, key: K) -> Result<(), Error> {
let key = key.as_ref(); let key = key.as_ref();

Loading…
Cancel
Save