mirror of
				https://github.com/astral-sh/uv.git
				synced 2025-11-03 21:23:54 +00:00 
			
		
		
		
	fix: expose AllowedYanks (#2608)
				
					
				
			## Summary If I see correctly, this is used in the interface of `DefaultResolverProvider` but not accessible outside.
This commit is contained in:
		
							parent
							
								
									a4fb2ad739
								
							
						
					
					
						commit
						68432e77e5
					
				
					 2 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -13,7 +13,7 @@ use crate::Manifest;
 | 
			
		|||
pub struct AllowedYanks(FxHashMap<PackageName, FxHashSet<Version>>);
 | 
			
		||||
 | 
			
		||||
impl AllowedYanks {
 | 
			
		||||
    pub(crate) fn from_manifest(manifest: &Manifest, markers: &MarkerEnvironment) -> Self {
 | 
			
		||||
    pub fn from_manifest(manifest: &Manifest, markers: &MarkerEnvironment) -> Self {
 | 
			
		||||
        let mut allowed_yanks = FxHashMap::<PackageName, FxHashSet<Version>>::default();
 | 
			
		||||
        for requirement in manifest
 | 
			
		||||
            .requirements
 | 
			
		||||
| 
						 | 
				
			
			@ -52,10 +52,7 @@ impl AllowedYanks {
 | 
			
		|||
 | 
			
		||||
    /// Returns versions for the given package which are allowed even if marked as yanked by the
 | 
			
		||||
    /// relevant index.
 | 
			
		||||
    pub(crate) fn allowed_versions(
 | 
			
		||||
        &self,
 | 
			
		||||
        package_name: &PackageName,
 | 
			
		||||
    ) -> Option<&FxHashSet<Version>> {
 | 
			
		||||
    pub fn allowed_versions(&self, package_name: &PackageName) -> Option<&FxHashSet<Version>> {
 | 
			
		||||
        self.0.get(package_name)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue