From 06a39278f39288d2edef4a1aa406a239f0b4c1fb Mon Sep 17 00:00:00 2001 From: Gary Tierney Date: Sun, 3 Sep 2017 18:38:05 +0100 Subject: [PATCH] Use ColumnFamilyDescriptor::new() in DB::open_cf() --- src/db.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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) }