diff --git a/src/options.rs b/src/options.rs index cc14ec2..693537e 100644 --- a/src/options.rs +++ b/src/options.rs @@ -2219,7 +2219,7 @@ impl DBOptions { /// Not supported in ROCKSDB_LITE mode! /// /// Rust: will move in and use share_ptr - pub fn row_cache(self, val: Option) -> Self { + pub fn row_cache(self, val: Option<&Cache>) -> Self { unsafe { if let Some(cache) = val { ll::rocks_dboptions_set_row_cache(self.raw, cache.raw()); diff --git a/src/table.rs b/src/table.rs index 0a273f4..709c035 100644 --- a/src/table.rs +++ b/src/table.rs @@ -166,7 +166,7 @@ impl BlockBasedTableOptions { /// If non-NULL use the specified cache for blocks. /// /// If NULL, rocksdb will automatically create and use an 8MB internal cache. - pub fn block_cache(self, val: Option) -> Self { + pub fn block_cache(self, val: Option<&Cache>) -> Self { unsafe { let ptr = val.map(|c| c.raw()).unwrap_or_else(ptr::null_mut); ll::rocks_block_based_table_options_set_block_cache(self.raw, ptr); @@ -189,7 +189,7 @@ impl BlockBasedTableOptions { /// If non-NULL use the specified cache for compressed blocks. /// /// If NULL, rocksdb will not use a compressed block cache. - pub fn block_cache_compressed(self, val: Option) -> Self { + pub fn block_cache_compressed(self, val: Option<&Cache>) -> Self { unsafe { let ptr = val.map(|c| c.raw()).unwrap_or_else(ptr::null_mut); ll::rocks_block_based_table_options_set_block_cache_compressed(self.raw, ptr);