From 47012260975af3173351c46fc8aaca61962296c7 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 28 Mar 2019 13:19:38 +0200 Subject: [PATCH] Update DB::compact_range_cf() arguments to be consistent with other methods --- src/db.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index 4099332..5420920 100644 --- a/src/db.rs +++ b/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, E: AsRef<[u8]>>( + &self, + cf: ColumnFamily, + start: Option, + end: Option, + ) { 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,