|
|
@ -359,11 +359,9 @@ impl<T: ThreadMode> TransactionDB<T> { |
|
|
|
name: &str, |
|
|
|
name: &str, |
|
|
|
opts: &Options, |
|
|
|
opts: &Options, |
|
|
|
) -> Result<*mut ffi::rocksdb_column_family_handle_t, Error> { |
|
|
|
) -> Result<*mut ffi::rocksdb_column_family_handle_t, Error> { |
|
|
|
let Ok(cf_name) = CString::new(name.as_bytes()) else { |
|
|
|
let cf_name = CString::new(name.as_bytes()).map_err(|_| { |
|
|
|
return Err(Error::new( |
|
|
|
Error::new("Failed to convert path to CString when creating cf".to_owned()) |
|
|
|
"Failed to convert path to CString when creating cf".to_owned(), |
|
|
|
})?; |
|
|
|
)); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ok(unsafe { |
|
|
|
Ok(unsafe { |
|
|
|
ffi_try!(ffi::rocksdb_transactiondb_create_column_family( |
|
|
|
ffi_try!(ffi::rocksdb_transactiondb_create_column_family( |
|
|
|