Merge pull request #289 from romanz/master

Update DB::compact_range_cf() arguments to be consistent with other methods
master
Oleksandr Anyshchenko 6 years ago committed by GitHub
commit d0c5c35546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/db.rs

@ -1362,8 +1362,16 @@ impl DB {
}
}
pub fn compact_range_cf(&self, cf: ColumnFamily, start: Option<&[u8]>, end: Option<&[u8]>) {
pub fn compact_range_cf<S: AsRef<[u8]>, E: AsRef<[u8]>>(
&self,
cf: ColumnFamily,
start: Option<S>,
end: Option<E>,
) {
unsafe {
let start = start.as_ref().map(|s| s.as_ref());
let end = end.as_ref().map(|e| e.as_ref());
ffi::rocksdb_compact_range_cf(
self.inner,
cf.inner,

Loading…
Cancel
Save