refactor(tvix/nix-compat): remove manual map
Change-Id: I1652e24c9be28112d98683de2d2db51dc46001ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/8302 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									c699ace11b
								
							
						
					
					
						commit
						84a8ed265c
					
				
					 1 changed files with 6 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -85,15 +85,13 @@ impl Derivation {
 | 
			
		|||
            return None;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        match self.outputs.get("out") {
 | 
			
		||||
            #[allow(clippy::manual_map)]
 | 
			
		||||
            Some(out_output) => match &out_output.hash {
 | 
			
		||||
                Some(out_output_hash) => Some((&out_output.path, out_output_hash)),
 | 
			
		||||
                // There has to be a hash, otherwise it would not be FOD
 | 
			
		||||
                None => None,
 | 
			
		||||
            },
 | 
			
		||||
            None => None,
 | 
			
		||||
        if let Some(out_output) = self.outputs.get("out") {
 | 
			
		||||
            if let Some(out_output_hash) = &out_output.hash {
 | 
			
		||||
                return Some((&out_output.path, out_output_hash));
 | 
			
		||||
            }
 | 
			
		||||
            // There has to be a hash, otherwise it would not be FOD
 | 
			
		||||
        }
 | 
			
		||||
        return None;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Returns the drv path of a Derivation struct.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue