refactor(tvix/eval): avoid a use of Value::Blackhole
The blackhole allocation is not going to be cheaper than cloning this. Change-Id: Id3ad44812decb4392830be06645e67bb0a982b96 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6267 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									babc249316
								
							
						
					
					
						commit
						1416f1ab8a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -39,8 +39,8 @@ impl AttrsRep {
 | 
			
		|||
 | 
			
		||||
            AttrsRep::KV { name, value } => {
 | 
			
		||||
                *self = AttrsRep::Map(BTreeMap::from([
 | 
			
		||||
                    (NixString::NAME, std::mem::replace(name, Value::Blackhole)),
 | 
			
		||||
                    (NixString::VALUE, std::mem::replace(value, Value::Blackhole)),
 | 
			
		||||
                    (NixString::NAME, name.clone()),
 | 
			
		||||
                    (NixString::VALUE, value.clone()),
 | 
			
		||||
                ]));
 | 
			
		||||
                self.map_mut()
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue