summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwqfish <wqfish@calibra.com>2020-01-26 06:25:38 -0800
committerIlya Bogdanov <ilya.bogdanov@xdev.re>2020-01-26 17:25:38 +0300
commitaa1aa97163b2db54e90e0056b150d5ff11af0068 (patch)
tree631ea13b55b3eee5dfdfd9261c1c3ca55a49e243
parent4f9524bd360ced44df53c4ee58afe121e78e9a5d (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.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/db.rs b/src/db.rs
index 8dc1df8..4eb476d 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -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();