aboutsummaryrefslogtreecommitdiff
path: root/azalea-client
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-07-26 00:45:06 -0500
committermat <git@matdoes.dev>2023-07-26 00:45:06 -0500
commit39943447f68fede8e8ed6799cc8eee7bddecf945 (patch)
treec5531085154982901b6c06b1fb63412efe914502 /azalea-client
parent22ea8c60fed17e48a591bcbb82808fed55509386 (diff)
downloadazalea-drasl-39943447f68fede8e8ed6799cc8eee7bddecf945.tar.xz
fix querying multiple components in entity_by
Diffstat (limited to 'azalea-client')
-rw-r--r--azalea-client/src/entity_query.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-client/src/entity_query.rs b/azalea-client/src/entity_query.rs
index 0320457f..d3fa522b 100644
--- a/azalea-client/src/entity_query.rs
+++ b/azalea-client/src/entity_query.rs
@@ -43,7 +43,7 @@ impl Client {
///
/// # fn example(mut bot: Client, sender_name: String) {
/// let entity = bot.entity_by::<With<Player>, (&GameProfileComponent,)>(
- /// |profile: &&GameProfileComponent| profile.name == sender_name,
+ /// |(profile,): &(&GameProfileComponent,)| profile.name == sender_name,
/// );
/// if let Some(entity) = entity {
/// let position = bot.entity_component::<Position>(entity);
@@ -76,7 +76,7 @@ impl Client {
pub trait EntityPredicate<Q: ReadOnlyWorldQuery, Filter: ReadOnlyWorldQuery> {
fn find(&self, ecs_lock: Arc<Mutex<World>>) -> Option<Entity>;
}
-impl<F, Q, Filter> EntityPredicate<(Q,), Filter> for F
+impl<F, Q, Filter> EntityPredicate<Q, Filter> for F
where
F: Fn(&ROQueryItem<Q>) -> bool,
Q: ReadOnlyWorldQuery,