diff --git a/lib/src/store/sled.rs b/lib/src/store/sled.rs index cc6eb37a..e613b4ff 100644 --- a/lib/src/store/sled.rs +++ b/lib/src/store/sled.rs @@ -61,15 +61,15 @@ pub struct SledStore { impl SledStore { /// Opens a temporary `SledStore` that will be deleted after drop. pub fn new() -> Result { - Self::do_open(Config::new().temporary(true)) + Self::do_open(&Config::new().temporary(true)) } /// Opens a `SledStore` pub fn open(path: impl AsRef) -> Result { - Self::do_open(Config::new().path(path)) + Self::do_open(&Config::new().path(path)) } - fn do_open(config: Config) -> Result { + fn do_open(config: &Config) -> Result { let db = config.open()?; let new = Self { id2str: db.open_tree("id2str")?,