Skip to content

Doc: update examples #685

@Nugine

Description

@Nugine

rust-rocksdb/README.md

Lines 86 to 90 in e97c9b5

let mut batch = WriteBatch::new(); // WriteBatch and db both have trait Writable
batch.put(b"my key", b"my value");
batch.put(b"key2", b"value2");
batch.put(b"key3", b"value3");
db.write(batch); // Atomically commits the batch

rust-rocksdb/src/rocksdb.rs

Lines 806 to 808 in e97c9b5

pub fn write(&self, batch: &WriteBatch) -> Result<(), String> {
self.write_opt(batch, &WriteOptions::new())
}

Corrected:

db.write(&batch).unwrap();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions