From aa1aa97163b2db54e90e0056b150d5ff11af0068 Mon Sep 17 00:00:00 2001 From: wqfish Date: Sun, 26 Jan 2020 06:25:38 -0800 Subject: [PATCH] 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 --- src/db.rs | 4 +--- 1 file changed, 1 insertion(+), 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>(&mut self, key: K) -> Result<(), Error> { let key = key.as_ref();