From 70e832e159699064f379c584ba451c6682d061c0 Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 22 Oct 2020 03:02:43 +0100 Subject: [PATCH] updated dep --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/database.rs | 9 +++++++-- src/dedup.rs | 2 +- src/resolve.rs | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 716592e..7aae4e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -617,9 +617,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallmap" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ce78b988fb0df3b438d106942c0c2438849ecf40e3418af55044f96d27514d" +checksum = "c1a44d2e06ab7b0b0b5f1cac4ebb9326be5d62d2f370bf032e12a29a5baf5772" dependencies = [ "rustc_version", ] diff --git a/Cargo.toml b/Cargo.toml index 195f7cd..221e698 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ chrono = "0.4.13" color-eyre = "0.5.1" lazy_static = "1.4.0" futures = "0.3.6" -smallmap = "1.1.5" +smallmap = "^1.1.6" [build-dependencies] rustc_version = "0.2" diff --git a/src/database.rs b/src/database.rs index c18b7f9..fd91444 100644 --- a/src/database.rs +++ b/src/database.rs @@ -39,8 +39,6 @@ impl fmt::Display for Error } } - - /// Contains Videl information for a database directory #[derive(Debug, Clone, PartialEq, Ord, Eq, PartialOrd, Hash)] pub struct Database @@ -50,6 +48,13 @@ pub struct Database impl Database { + /// Create a new database for this path + pub fn new(path: PathBuf) -> Self + { + Self { + path, + } + } /// Save this database to a stream pub async fn save(&self, stream: &mut T) -> Result { diff --git a/src/dedup.rs b/src/dedup.rs index 01bbd94..d3fe966 100644 --- a/src/dedup.rs +++ b/src/dedup.rs @@ -19,7 +19,7 @@ fn compute_hash_single(value: &T) -> u64 hasher.finish() } -/// De-duplicating iterator +/// De-duplicating iterator with low hashing precision (64 bits) #[derive(Debug, Clone)] pub struct DedupIter where T: Hash, diff --git a/src/resolve.rs b/src/resolve.rs index 61940a1..75e062f 100644 --- a/src/resolve.rs +++ b/src/resolve.rs @@ -67,7 +67,7 @@ pub enum ResolutionError Name, Utf8, #[cfg(feature="fast-pathnames")] - Base64Decode(base64::Error), + Base64Decode(base64::DecodeError), IO(io::Error), Open(io::Error), Database(database::Error),