Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
buffrr committed Aug 1, 2024
1 parent 4ad7092 commit b3a53e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;

Expand Down
2 changes: 1 addition & 1 deletion example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;

Expand Down

0 comments on commit b3a53e7

Please sign in to comment.