mirror of https://github.com/zkat/cacache-rs.git
fix(cleanup): general house cleaning, bumping deps, etc
This commit is contained in:
parent
8d08e45298
commit
9163a58481
30
Cargo.toml
30
Cargo.toml
|
|
@ -15,24 +15,24 @@ categories = [
|
|||
|
||||
[dependencies]
|
||||
ssri = "7.0.0"
|
||||
hex = "0.4.0"
|
||||
tempfile = "3.1.0"
|
||||
sha-1 = "0.8.1"
|
||||
sha2 = "0.8.0"
|
||||
digest = "0.8.1"
|
||||
serde_json = "1.0.41"
|
||||
serde = "1.0.102"
|
||||
serde_derive = "1.0.102"
|
||||
walkdir = "2.2.9"
|
||||
either = "1.5.3"
|
||||
async-std = { version = "1.0.1", features = ["unstable"] }
|
||||
thiserror = "1.0.5"
|
||||
futures = "0.3.1"
|
||||
hex = "0.4.3"
|
||||
tempfile = "3.2.0"
|
||||
sha-1 = "0.9.8"
|
||||
sha2 = "0.9.8"
|
||||
digest = "0.9.0"
|
||||
serde_json = "1.0.68"
|
||||
serde = "1.0.130"
|
||||
serde_derive = "1.0.130"
|
||||
walkdir = "2.3.2"
|
||||
either = "1.6.1"
|
||||
async-std = { version = "1.10.0", features = ["unstable"] }
|
||||
thiserror = "1.0.29"
|
||||
futures = "0.3.17"
|
||||
memmap = "0.7.0"
|
||||
|
||||
[dev-dependencies]
|
||||
async-attributes = "1.1.1"
|
||||
criterion = "0.3.0"
|
||||
async-attributes = "1.1.2"
|
||||
criterion = "0.3.5"
|
||||
|
||||
[[bench]]
|
||||
name = "benchmarks"
|
||||
|
|
|
|||
|
|
@ -267,14 +267,14 @@ fn bucket_path(cache: &Path, key: &str) -> PathBuf {
|
|||
|
||||
fn hash_key(key: &str) -> String {
|
||||
let mut hasher = Sha1::new();
|
||||
hasher.input(&key);
|
||||
hex::encode(hasher.result())
|
||||
hasher.update(&key);
|
||||
hex::encode(hasher.finalize())
|
||||
}
|
||||
|
||||
fn hash_entry(key: &str) -> String {
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.input(&key);
|
||||
hex::encode(hasher.result())
|
||||
hasher.update(&key);
|
||||
hex::encode(hasher.finalize())
|
||||
}
|
||||
|
||||
fn now() -> u128 {
|
||||
|
|
|
|||
12
src/rm.rs
12
src/rm.rs
|
|
@ -214,7 +214,7 @@ mod tests {
|
|||
assert!(entry.is_some());
|
||||
|
||||
let data_exists = crate::exists(&dir, &sri).await;
|
||||
assert!(data_exists);
|
||||
assert!(!data_exists);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -228,10 +228,10 @@ mod tests {
|
|||
crate::clear(&dir).await.unwrap();
|
||||
|
||||
let entry = crate::metadata(&dir, "key").await.unwrap();
|
||||
assert!(entry.is_some());
|
||||
assert!(entry.is_none());
|
||||
|
||||
let data_exists = crate::exists(&dir, &sri).await;
|
||||
assert!(data_exists);
|
||||
assert!(!data_exists);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ mod tests {
|
|||
crate::remove_sync(&dir, "key").unwrap();
|
||||
|
||||
let new_entry = crate::metadata_sync(&dir, "key").unwrap();
|
||||
assert_eq!(new_entry, None);
|
||||
assert!(new_entry.is_none());
|
||||
|
||||
let data_exists = crate::exists_sync(&dir, &sri);
|
||||
assert!(data_exists);
|
||||
|
|
@ -262,7 +262,7 @@ mod tests {
|
|||
assert!(entry.is_some());
|
||||
|
||||
let data_exists = crate::exists_sync(&dir, &sri);
|
||||
assert!(data_exists);
|
||||
assert!(!data_exists);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -277,6 +277,6 @@ mod tests {
|
|||
assert_eq!(entry, None);
|
||||
|
||||
let data_exists = crate::exists_sync(&dir, &sri);
|
||||
assert!(data_exists);
|
||||
assert!(!data_exists);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue