Use ColumnFamilyDescriptor::new() in DB::open_cf()

master
Gary Tierney 7 years ago
parent a4a3e1d7c4
commit 06a39278f3
  1. 5
      src/db.rs

@ -586,10 +586,7 @@ impl DB {
///
/// Column families opened using this function will be created with default `Options`.
pub fn open_cf<P: AsRef<Path>>(opts: &Options, path: P, cfs: &[&str]) -> Result<DB, Error> {
let cfs_v = cfs.to_vec().iter().map(|name| ColumnFamilyDescriptor {
name: name.to_string(),
options: Options::default(),
}).collect();
let cfs_v = cfs.to_vec().iter().map(|name| ColumnFamilyDescriptor::new(*name, Options::default())).collect();
DB::open_cf_descriptors(opts, path, cfs_v)
}

Loading…
Cancel
Save