From 26eff55b315acb864675805b1747a0cdc195be70 Mon Sep 17 00:00:00 2001 From: Christofer Nolander Date: Sun, 28 Apr 2024 23:41:22 +0200 Subject: [PATCH] clarify that `Database::put_*` methods overwrite the previous value --- heed/src/database.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/heed/src/database.rs b/heed/src/database.rs index 936603d..a772f8f 100644 --- a/heed/src/database.rs +++ b/heed/src/database.rs @@ -1787,7 +1787,8 @@ impl Database { RwCursor::new(txn, self.dbi).map(|cursor| RwRevPrefix::new(cursor, prefix_bytes)) } - /// Insert a key-value pair in this database. The entry is written with no specific flag. + /// Insert a key-value pair in this database, replacing any previous value. The entry is + /// written with no specific flag. /// /// ``` /// # use std::fs; @@ -1842,7 +1843,8 @@ impl Database { Ok(()) } - /// Insert a key-value pair where the value can directly be written to disk. + /// Insert a key-value pair where the value can directly be written to disk, replacing any + /// previous value. /// /// ``` /// # use std::fs; @@ -1908,7 +1910,8 @@ impl Database { } } - /// Insert a key-value pair in this database. The entry is written with the specified flags. + /// Insert a key-value pair in this database, replacing any previous value. The entry is + /// written with the specified flags. /// /// ``` /// # use std::fs;