Sled: makes Clippy happy

pull/35/head
Tpt 5 years ago
parent feaca89f77
commit eeda469f1d
  1. 6
      lib/src/store/sled.rs

@ -61,15 +61,15 @@ pub struct SledStore {
impl SledStore { impl SledStore {
/// Opens a temporary `SledStore` that will be deleted after drop. /// Opens a temporary `SledStore` that will be deleted after drop.
pub fn new() -> Result<Self> { pub fn new() -> Result<Self> {
Self::do_open(Config::new().temporary(true)) Self::do_open(&Config::new().temporary(true))
} }
/// Opens a `SledStore` /// Opens a `SledStore`
pub fn open(path: impl AsRef<Path>) -> Result<Self> { pub fn open(path: impl AsRef<Path>) -> Result<Self> {
Self::do_open(Config::new().path(path)) Self::do_open(&Config::new().path(path))
} }
fn do_open(config: Config) -> Result<Self> { fn do_open(config: &Config) -> Result<Self> {
let db = config.open()?; let db = config.open()?;
let new = Self { let new = Self {
id2str: db.open_tree("id2str")?, id2str: db.open_tree("id2str")?,

Loading…
Cancel
Save