diff options
author | wqfish <wqfish@calibra.com> | 2020-01-26 06:25:38 -0800 |
---|---|---|
committer | Ilya Bogdanov <ilya.bogdanov@xdev.re> | 2020-01-26 17:25:38 +0300 |
commit | aa1aa97163b2db54e90e0056b150d5ff11af0068 (patch) | |
tree | 631ea13b55b3eee5dfdfd9261c1c3ca55a49e243 | |
parent | 4f9524bd360ced44df53c4ee58afe121e78e9a5d (diff) |
Fix doc for WriteBatch::delete (#376)
The function does nothing if the key is not found in DB. See
https://github.com/facebook/rocksdb/blob/1dd7873e08c1f55dabb8451f1b8795fcdb012887/include/rocksdb/write_batch.h#L85
Fixes https://github.com/rust-rocksdb/rust-rocksdb/issues/352
-rw-r--r-- | src/db.rs | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1765,9 +1765,7 @@ impl WriteBatch { } } - /// Remove the database entry for key. - /// - /// Returns an error if the key was not found. + /// Removes the database entry for key. Does nothing if the key was not found. pub fn delete<K: AsRef<[u8]>>(&mut self, key: K) -> Result<(), Error> { let key = key.as_ref(); |