mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-01 20:31:12 +00:00
Use hasher to compute resolution hash (#5495)
## Summary Addressing one TODO. This should be more efficient.
This commit is contained in:
parent
e8d7c0cb58
commit
561625ed8c
18 changed files with 78 additions and 69 deletions
|
|
@ -2,7 +2,7 @@ use std::path::{Path, PathBuf};
|
|||
|
||||
use url::Url;
|
||||
|
||||
use cache_key::{digest, CanonicalUrl};
|
||||
use cache_key::{cache_digest, CanonicalUrl};
|
||||
use distribution_types::IndexUrl;
|
||||
|
||||
/// Cache wheels and their metadata, both from remote wheels and built from source distributions.
|
||||
|
|
@ -30,19 +30,19 @@ impl<'a> WheelCache<'a> {
|
|||
WheelCache::Index(IndexUrl::Pypi(_)) => WheelCacheKind::Pypi.root(),
|
||||
WheelCache::Index(url) => WheelCacheKind::Index
|
||||
.root()
|
||||
.join(digest(&CanonicalUrl::new(url))),
|
||||
.join(cache_digest(&CanonicalUrl::new(url))),
|
||||
WheelCache::Url(url) => WheelCacheKind::Url
|
||||
.root()
|
||||
.join(digest(&CanonicalUrl::new(url))),
|
||||
.join(cache_digest(&CanonicalUrl::new(url))),
|
||||
WheelCache::Path(url) => WheelCacheKind::Path
|
||||
.root()
|
||||
.join(digest(&CanonicalUrl::new(url))),
|
||||
.join(cache_digest(&CanonicalUrl::new(url))),
|
||||
WheelCache::Editable(url) => WheelCacheKind::Editable
|
||||
.root()
|
||||
.join(digest(&CanonicalUrl::new(url))),
|
||||
.join(cache_digest(&CanonicalUrl::new(url))),
|
||||
WheelCache::Git(url, sha) => WheelCacheKind::Git
|
||||
.root()
|
||||
.join(digest(&CanonicalUrl::new(url)))
|
||||
.join(cache_digest(&CanonicalUrl::new(url)))
|
||||
.join(sha),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue