fix unsafe Query function names (#785)

This commit is contained in:
Carter Anderson 2020-11-03 14:10:29 -08:00 committed by GitHub
parent 9afe196f16
commit 1aa832be1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,7 @@ impl<'a, Q: HecsQuery> Query<'a, Q> {
/// Gets the query result for the given `entity` /// Gets the query result for the given `entity`
/// # Safety /// # Safety
/// This allows aliased mutability. You must make sure this call does not result in multiple mutable references to the same component /// This allows aliased mutability. You must make sure this call does not result in multiple mutable references to the same component
pub unsafe fn entity_unsafe( pub unsafe fn get_unsafe(
&self, &self,
entity: Entity, entity: Entity,
) -> Result<<Q::Fetch as Fetch>::Item, QueryError> { ) -> Result<<Q::Fetch as Fetch>::Item, QueryError> {
@ -161,7 +161,7 @@ impl<'a, Q: HecsQuery> Query<'a, Q> {
/// the given component type /// the given component type
/// # Safety /// # Safety
/// This allows aliased mutability. You must make sure this call does not result in multiple mutable references to the same component /// This allows aliased mutability. You must make sure this call does not result in multiple mutable references to the same component
pub unsafe fn get_unsafe<T: Component>( pub unsafe fn get_component_unsafe<T: Component>(
&self, &self,
entity: Entity, entity: Entity,
) -> Result<Mut<'_, T>, QueryError> { ) -> Result<Mut<'_, T>, QueryError> {