Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
RobWalt committed Dec 5, 2024
1 parent ca41ef6 commit 2689ce0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions bevy-trait-query/src/all/core/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand All @@ -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>;
Expand Down
8 changes: 4 additions & 4 deletions bevy-trait-query/src/all/impls/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ use crate::{
/// - `Query<&mut dyn Trait>` yields a [`WriteTraits`] object
pub struct All<T: ?Sized>(T);

unsafe impl<'a, Trait: ?Sized + TraitQuery> QueryData for All<&'a Trait> {
unsafe impl<Trait: ?Sized + TraitQuery> QueryData for All<&Trait> {
type ReadOnly = Self;
}
unsafe impl<'a, Trait: ?Sized + TraitQuery> ReadOnlyQueryData for All<&'a Trait> {}
unsafe impl<Trait: ?Sized + TraitQuery> 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<Trait: ?Sized + TraitQuery> WorldQuery for All<&Trait> {
type Item<'w> = ReadTraits<'w, Trait>;
type Fetch<'w> = AllTraitsFetch<'w, Trait>;
type State = TraitQueryState<Trait>;
Expand Down Expand Up @@ -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<Trait: ?Sized + TraitQuery> WorldQuery for All<&mut Trait> {
type Item<'w> = WriteTraits<'w, Trait>;
type Fetch<'w> = AllTraitsFetch<'w, Trait>;
type State = TraitQueryState<Trait>;
Expand Down
8 changes: 4 additions & 4 deletions bevy-trait-query/src/one/impls/one.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ use crate::{
/// - `Query<One<&mut dyn Trait>>` yields a [`Mut`] object
pub struct One<T>(pub T);

unsafe impl<'a, T: ?Sized + TraitQuery> QueryData for One<&'a T> {
unsafe impl<T: ?Sized + TraitQuery> QueryData for One<&T> {
type ReadOnly = Self;
}
unsafe impl<'a, T: ?Sized + TraitQuery> ReadOnlyQueryData for One<&'a T> {}
unsafe impl<T: ?Sized + TraitQuery> ReadOnlyQueryData for One<&T> {}

unsafe impl<'a, T: ?Sized + TraitQuery> QueryData for One<&'a mut T> {
type ReadOnly = One<&'a 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<Trait: ?Sized + TraitQuery> WorldQuery for One<&Trait> {
type Item<'w> = Ref<'w, Trait>;
type Fetch<'w> = OneTraitFetch<'w, Trait>;
type State = TraitQueryState<Trait>;
Expand Down Expand Up @@ -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<Trait: ?Sized + TraitQuery> WorldQuery for One<&mut Trait> {
type Item<'w> = Mut<'w, Trait>;
type Fetch<'w> = OneTraitFetch<'w, Trait>;
type State = TraitQueryState<Trait>;
Expand Down

0 comments on commit 2689ce0

Please sign in to comment.