Parallelize network requests in uv tree --outdated (#9280)

## Summary

Closes https://github.com/astral-sh/uv/issues/9266.
This commit is contained in:
Charlie Marsh 2024-11-20 11:45:14 -05:00 committed by GitHub
parent 23cc9b0322
commit a0de83001c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 51 additions and 27 deletions

View file

@ -13,6 +13,11 @@ impl<T> Default for PackageMap<T> {
}
impl<T> PackageMap<T> {
/// Insert a value by [`PackageId`].
pub fn insert(&mut self, package: Package, value: T) -> Option<T> {
self.0.insert(package.id, value)
}
/// Get a value by [`PackageId`].
pub(crate) fn get(&self, package_id: &PackageId) -> Option<&T> {
self.0.get(package_id)