fix some warnings

This commit is contained in:
TudbuT 2023-06-24 15:31:34 +02:00
parent 010c2492e2
commit 795f215a83
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "microdb"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
description = "A very small in-program database with cache, disk storage, etc."
license = "MIT"

View file

@ -82,7 +82,7 @@ where
}
}
fn paths<P: Path>(path: P, db: &MicroDB) -> Result<Vec<String>, io::Error> {
fn paths<P: Path>(path: P, _db: &MicroDB) -> Result<Vec<String>, io::Error> {
Ok(vec![path.sub_path("type"), path.sub_path("data")])
}
}

View file

@ -71,6 +71,6 @@ where
fn paths<P: Path>(path: P, db: &MicroDB) -> Result<Vec<String>, std::io::Error> {
let Some(len): Option<u64> = db.get_raw(path.clone())? else { return Ok(vec![]) };
Ok((0..len as u64).map(|x| path.sub_path(x)).collect())
Ok((0..len).map(|x| path.sub_path(x)).collect())
}
}