From 2689ce0b1f13c58c02ab952a59ec9e4e1c834969 Mon Sep 17 00:00:00 2001 From: aviac Date: Thu, 5 Dec 2024 11:10:30 +0100 Subject: [PATCH] make clippy happy --- bevy-trait-query/src/all/core/write.rs | 8 ++++---- bevy-trait-query/src/all/impls/all.rs | 8 ++++---- bevy-trait-query/src/one/impls/one.rs | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bevy-trait-query/src/all/core/write.rs b/bevy-trait-query/src/all/core/write.rs index 8928278..1fa6ff5 100644 --- a/bevy-trait-query/src/all/core/write.rs +++ b/bevy-trait-query/src/all/core/write.rs @@ -203,8 +203,8 @@ impl<'w, Trait: ?Sized + TraitQuery> IntoIterator for WriteTraits<'w, Trait> { } } -impl<'world, 'local, Trait: ?Sized + TraitQuery> IntoIterator - for &'local WriteTraits<'world, Trait> +impl<'local, Trait: ?Sized + TraitQuery> IntoIterator + for &'local WriteTraits<'_, Trait> { type Item = Ref<'local, Trait>; type IntoIter = CombinedReadTraitsIter<'local, Trait>; @@ -230,8 +230,8 @@ impl<'world, 'local, Trait: ?Sized + TraitQuery> IntoIterator } } -impl<'world, 'local, Trait: ?Sized + TraitQuery> IntoIterator - for &'local mut WriteTraits<'world, Trait> +impl<'local, Trait: ?Sized + TraitQuery> IntoIterator + for &'local mut WriteTraits<'_, Trait> { type Item = Mut<'local, Trait>; type IntoIter = CombinedWriteTraitsIter<'local, Trait>; diff --git a/bevy-trait-query/src/all/impls/all.rs b/bevy-trait-query/src/all/impls/all.rs index 99b2572..690d8dd 100644 --- a/bevy-trait-query/src/all/impls/all.rs +++ b/bevy-trait-query/src/all/impls/all.rs @@ -26,15 +26,15 @@ use crate::{ /// - `Query<&mut dyn Trait>` yields a [`WriteTraits`] object pub struct All(T); -unsafe impl<'a, Trait: ?Sized + TraitQuery> QueryData for All<&'a Trait> { +unsafe impl QueryData for All<&Trait> { type ReadOnly = Self; } -unsafe impl<'a, Trait: ?Sized + TraitQuery> ReadOnlyQueryData for All<&'a Trait> {} +unsafe impl ReadOnlyQueryData for All<&Trait> {} // SAFETY: We only access the components registered in the trait registry. // This is known to match the set of components in the TraitQueryState, // which is used to match archetypes and register world access. -unsafe impl<'a, Trait: ?Sized + TraitQuery> WorldQuery for All<&'a Trait> { +unsafe impl WorldQuery for All<&Trait> { type Item<'w> = ReadTraits<'w, Trait>; type Fetch<'w> = AllTraitsFetch<'w, Trait>; type State = TraitQueryState; @@ -159,7 +159,7 @@ unsafe impl<'a, Trait: ?Sized + TraitQuery> QueryData for All<&'a mut Trait> { // SAFETY: We only access the components registered in the trait registry. // This is known to match the set of components in the TraitQueryState, // which is used to match archetypes and register world access. -unsafe impl<'a, Trait: ?Sized + TraitQuery> WorldQuery for All<&'a mut Trait> { +unsafe impl WorldQuery for All<&mut Trait> { type Item<'w> = WriteTraits<'w, Trait>; type Fetch<'w> = AllTraitsFetch<'w, Trait>; type State = TraitQueryState; diff --git a/bevy-trait-query/src/one/impls/one.rs b/bevy-trait-query/src/one/impls/one.rs index 3c749cc..0577ebb 100644 --- a/bevy-trait-query/src/one/impls/one.rs +++ b/bevy-trait-query/src/one/impls/one.rs @@ -22,10 +22,10 @@ use crate::{ /// - `Query>` yields a [`Mut`] object pub struct One(pub T); -unsafe impl<'a, T: ?Sized + TraitQuery> QueryData for One<&'a T> { +unsafe impl QueryData for One<&T> { type ReadOnly = Self; } -unsafe impl<'a, T: ?Sized + TraitQuery> ReadOnlyQueryData for One<&'a T> {} +unsafe impl ReadOnlyQueryData for One<&T> {} unsafe impl<'a, T: ?Sized + TraitQuery> QueryData for One<&'a mut T> { type ReadOnly = One<&'a T>; @@ -33,7 +33,7 @@ unsafe impl<'a, T: ?Sized + TraitQuery> QueryData for One<&'a mut T> { // SAFETY: We only access the components registered in TraitQueryState. // This same set of components is used to match archetypes, and used to register world access. -unsafe impl<'a, Trait: ?Sized + TraitQuery> WorldQuery for One<&'a Trait> { +unsafe impl WorldQuery for One<&Trait> { type Item<'w> = Ref<'w, Trait>; type Fetch<'w> = OneTraitFetch<'w, Trait>; type State = TraitQueryState; @@ -241,7 +241,7 @@ unsafe impl<'a, Trait: ?Sized + TraitQuery> WorldQuery for One<&'a Trait> { // SAFETY: We only access the components registered in TraitQueryState. // This same set of components is used to match archetypes, and used to register world access. -unsafe impl<'a, Trait: ?Sized + TraitQuery> WorldQuery for One<&'a mut Trait> { +unsafe impl WorldQuery for One<&mut Trait> { type Item<'w> = Mut<'w, Trait>; type Fetch<'w> = OneTraitFetch<'w, Trait>; type State = TraitQueryState;