mirror of https://github.com/zkat/cacache-rs.git
Merge 5e274f428b into 105692a4da
This commit is contained in:
commit
571737bfe1
|
|
@ -15,7 +15,7 @@ async-std = { version = "1.10.0", features = ["unstable"], optional = true }
|
||||||
digest = "0.10.6"
|
digest = "0.10.6"
|
||||||
either = "1.6.1"
|
either = "1.6.1"
|
||||||
futures = { version = "0.3.17", optional = true }
|
futures = { version = "0.3.17", optional = true }
|
||||||
hex = "0.4.3"
|
const-hex = "1.0.0"
|
||||||
memmap2 = { version = "0.5.8", optional = true }
|
memmap2 = { version = "0.5.8", optional = true }
|
||||||
miette = "5.7.0"
|
miette = "5.7.0"
|
||||||
reflink-copy = "0.1.9"
|
reflink-copy = "0.1.9"
|
||||||
|
|
|
||||||
|
|
@ -309,13 +309,13 @@ fn bucket_path(cache: &Path, key: &str) -> PathBuf {
|
||||||
fn hash_key(key: &str) -> String {
|
fn hash_key(key: &str) -> String {
|
||||||
let mut hasher = Sha1::new();
|
let mut hasher = Sha1::new();
|
||||||
hasher.update(key);
|
hasher.update(key);
|
||||||
hex::encode(hasher.finalize())
|
const_hex::encode(hasher.finalize())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash_entry(key: &str) -> String {
|
fn hash_entry(key: &str) -> String {
|
||||||
let mut hasher = Sha256::new();
|
let mut hasher = Sha256::new();
|
||||||
hasher.update(key);
|
hasher.update(key);
|
||||||
hex::encode(hasher.finalize())
|
const_hex::encode(hasher.finalize())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn now() -> u128 {
|
fn now() -> u128 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue