Use RPIT to get static dispatch GetStandardProperties.
This commit is contained in:
		
							parent
							
								
									31fb815681
								
							
						
					
					
						commit
						49f6e70a19
					
				| @ -10,3 +10,14 @@ impl<'s, I: StandardProperties<'s>> GetStandardProperties<'s> for I { | ||||
|         self | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| pub trait NewGetStandardProperties<'s> { | ||||
|     // TODO: Can I eliminate this dynamic dispatch, perhaps using nominal generic structs? Low prioritiy since this is not used during parsing.
 | ||||
|     fn get_standard_properties(self) -> impl StandardProperties<'s>; | ||||
| } | ||||
| 
 | ||||
| impl<'s, I: StandardProperties<'s>> NewGetStandardProperties<'s> for I { | ||||
|     fn get_standard_properties(self) -> impl StandardProperties<'s> { | ||||
|         self | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander