From b3a53e7077efae3817ee4397c08b64adbf96b3db Mon Sep 17 00:00:00 2001 From: Buffrr Date: Wed, 31 Jul 2024 15:41:43 -0700 Subject: [PATCH] Update example --- README.md | 2 +- example/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d4b9f9..b9cecac 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ let mut tx = db.begin_write()?; for i in 0..100 { let key = format!("key{}", i); let value = format!("value{}", i); - tx.insert(db.hash(key.as_bytes()), value.into_bytes())?; + tx = tx.insert(db.hash(key.as_bytes()), value.into_bytes())?; } tx.commit()?; diff --git a/example/src/main.rs b/example/src/main.rs index fda1dec..13b73e5 100644 --- a/example/src/main.rs +++ b/example/src/main.rs @@ -9,7 +9,7 @@ fn main() -> Result<()> { for i in 0..100 { let key = format!("key{}", i); let value = format!("value{}", i); - tx.insert(db.hash(key.as_bytes()), value.into_bytes())?; + tx = tx.insert(db.hash(key.as_bytes()), value.into_bytes())?; } tx.commit()?;