improvement: feature flags for sled, rocksdb

This commit is contained in:
Timo Kösters 2021-06-12 15:04:28 +02:00
parent 2078af59d8
commit cd4bc520d8
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
10 changed files with 71 additions and 50 deletions

View file

@ -1,7 +1,6 @@
use argon2::{Config, Variant};
use cmp::Ordering;
use rand::prelude::*;
use rocksdb::MergeOperands;
use ruma::serde::{try_from_json_map, CanonicalJsonError, CanonicalJsonObject};
use std::{
cmp,
@ -16,10 +15,11 @@ pub fn millis_since_unix_epoch() -> u64 {
.as_millis() as u64
}
#[cfg(feature = "rocksdb")]
pub fn increment_rocksdb(
_new_key: &[u8],
old: Option<&[u8]>,
_operands: &mut MergeOperands,
_operands: &mut rocksdb::MergeOperands,
) -> Option<Vec<u8>> {
increment(old)
}