mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Avoid cloning to string when creating cache path (#11772)
## Summary Not important but there's no need to allocate to `String` here.
This commit is contained in:
parent
ce3654da77
commit
3a18f31751
1 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ impl<'a> RegistryWheelIndex<'a> {
|
|||
// Index all the wheels that were downloaded directly from the registry.
|
||||
let wheel_dir = cache.shard(
|
||||
CacheBucket::Wheels,
|
||||
WheelCache::Index(index.url()).wheel_dir(package.to_string()),
|
||||
WheelCache::Index(index.url()).wheel_dir(package.as_ref()),
|
||||
);
|
||||
|
||||
// For registry wheels, the cache structure is: `<index>/<package-name>/<wheel>.http`
|
||||
|
@ -166,7 +166,7 @@ impl<'a> RegistryWheelIndex<'a> {
|
|||
// from the registry.
|
||||
let cache_shard = cache.shard(
|
||||
CacheBucket::SourceDistributions,
|
||||
WheelCache::Index(index.url()).wheel_dir(package.to_string()),
|
||||
WheelCache::Index(index.url()).wheel_dir(package.as_ref()),
|
||||
);
|
||||
|
||||
// For registry source distributions, the cache structure is: `<index>/<package-name>/<version>/`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue