Skip to content

Commit

Permalink
fix: EntityRef::query no longer requires self lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
ten3roberts committed Apr 20, 2024
1 parent 1f56e89 commit a744daa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/entity_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,10 @@ impl<'a> EntityRef<'a> {
}

/// Perform a query on the entity
pub fn query<'q, Q: Fetch<'q>>(&'q self, query: &'q Q) -> QueryOne<'q, Q> {
pub fn query<'q, Q: Fetch<'q>>(&self, query: &'q Q) -> QueryOne<'q, Q>
where
'a: 'q,
{
QueryOne::new(query, self.world, self.arch, self.loc)
}

Expand Down

0 comments on commit a744daa

Please sign in to comment.