DB::repair: pass Options by ref (#350)

master
Andronik Ordian 5 years ago committed by Oleksandr Anyshchenko
parent 6c7f6af7d7
commit 52ebdb5219
  1. 2
      src/db.rs

@ -899,7 +899,7 @@ impl DB {
Ok(()) Ok(())
} }
pub fn repair<P: AsRef<Path>>(opts: Options, path: P) -> Result<(), Error> { pub fn repair<P: AsRef<Path>>(opts: &Options, path: P) -> Result<(), Error> {
let cpath = to_cpath(path)?; let cpath = to_cpath(path)?;
unsafe { unsafe {
ffi_try!(ffi::rocksdb_repair_db(opts.inner, cpath.as_ptr(),)); ffi_try!(ffi::rocksdb_repair_db(opts.inner, cpath.as_ptr(),));

Loading…
Cancel
Save