Change bevy_core::Name to implement Deref<Target = str> (#3681)
# Objective Fixes #3613 [Link to issue](https://github.com/bevyengine/bevy/issues/3613) ## Solution Changed the Deref Target to `str` and changed the `deref()` function body so that a `&str` is returned by using `as_ref() `.
This commit is contained in:
		
							parent
							
								
									e16ba80bd2
								
							
						
					
					
						commit
						8139022ecd
					
				| @ -107,9 +107,9 @@ impl Ord for Name { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| impl Deref for Name { | impl Deref for Name { | ||||||
|     type Target = Cow<'static, str>; |     type Target = str; | ||||||
| 
 | 
 | ||||||
|     fn deref(&self) -> &Self::Target { |     fn deref(&self) -> &Self::Target { | ||||||
|         &self.name |         self.name.as_ref() | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Chris J G
						Chris J G