Commit 7459362e authored by Tyler Neely's avatar Tyler Neely

small readme cleanup

parent 3c9895e2
...@@ -42,12 +42,9 @@ extern crate rocksdb; ...@@ -42,12 +42,9 @@ extern crate rocksdb;
use rocksdb::{RocksDBOptions, RocksDB, MergeOperands}; use rocksdb::{RocksDBOptions, RocksDB, MergeOperands};
fn concat_merge(new_key: &[u8], existing_val: Option<&[u8]>, fn concat_merge(new_key: &[u8], existing_val: Option<&[u8]>,
mut operands: &mut MergeOperands) -> Vec<u8> { operands: &mut MergeOperands) -> Vec<u8> {
let mut result: Vec<u8> = Vec::with_capacity(operands.size_hint().0); let mut result: Vec<u8> = Vec::with_capacity(operands.size_hint().0);
match existing_val { existing_val.map(|v| { result.push_all(v) });
Some(v) => result.push_all(v),
None => (),
}
for op in operands { for op in operands {
result.push_all(op); result.push_all(op);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment