Commit 29b7f64a authored by Dylan Wen's avatar Dylan Wen Committed by siddontang

mark new_with constructor unsafe for Options (#27)

parent b8332a75
......@@ -919,14 +919,14 @@ impl DB {
pub fn get_options(&self) -> Options {
unsafe {
let inner = crocksdb_ffi::crocksdb_get_options(self.inner);
Options::new_with(inner)
Options::from_raw(inner)
}
}
pub fn get_options_cf(&self, cf: &CFHandle) -> Options {
unsafe {
let inner = crocksdb_ffi::crocksdb_get_options_cf(self.inner, cf.inner);
Options::new_with(inner)
Options::from_raw(inner)
}
}
......
......@@ -285,7 +285,7 @@ impl Options {
Options::default()
}
pub fn new_with(inner: *mut DBOptions) -> Options {
pub unsafe fn from_raw(inner: *mut DBOptions) -> Options {
assert!(!inner.is_null(),
"could not new rocksdb options with null inner");
Options {
......
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