diff --git a/src/db.rs b/src/db.rs index bfb3d45..8b31151 100644 --- a/src/db.rs +++ b/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>(opts: &Options, path: P, cfs: &[&str]) -> Result { - 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) }