refactor(tvix/eval): remove Error::InvalidKeyType
We're confident that we're handling all branches that can reasonably occur from valid AST, any other cases should be considered a critical evaluator bug and panic rather than surfacing something that looks like user error. Change-Id: If96966eb32b8ff12fcaeb9ea3b0c8fc51b6abd11 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6205 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									ab9407bded
								
							
						
					
					
						commit
						de26894814
					
				
					 2 changed files with 1 additions and 9 deletions
				
			
		|  | @ -6,10 +6,6 @@ pub enum Error { | ||||||
|         key: String, |         key: String, | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     InvalidKeyType { |  | ||||||
|         given: &'static str, |  | ||||||
|     }, |  | ||||||
| 
 |  | ||||||
|     AttributeNotFound { |     AttributeNotFound { | ||||||
|         name: String, |         name: String, | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|  | @ -256,11 +256,7 @@ impl NixAttrs { | ||||||
|                     continue; |                     continue; | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 other => { |                 other => panic!("unexpected attribute key type: {}", other.type_of()), | ||||||
|                     return Err(Error::InvalidKeyType { |  | ||||||
|                         given: other.type_of(), |  | ||||||
|                     }) |  | ||||||
|                 } |  | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue