Skip to content

Commit

Permalink
Clippy + fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzm3r committed Dec 10, 2022
1 parent b9779d5 commit b7bad05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
18 changes: 1 addition & 17 deletions src/change_detection.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
use crate::{TraitImplRegistry, TraitQuery, TraitQueryState};
use bevy::ecs::archetype::{Archetype, ArchetypeComponentId};
use bevy::ecs::component::{ComponentId, ComponentTicks};
use bevy::ecs::component::ComponentTicks;
use bevy::prelude::DetectChanges;
use std::cell::UnsafeCell;
use std::marker::PhantomData;
use std::ops::{Deref, DerefMut};

use bevy::ecs::entity::Entity;
use bevy::ecs::query::{Access, FilteredAccess, ReadOnlyWorldQuery, WorldQuery};
use bevy::ecs::storage::{ComponentSparseSet, SparseSets, Table};
use bevy::ecs::world::World;
use bevy::ptr::{ThinSlicePtr, UnsafeCellDeref};

/// Unique mutable borrow of an entity's component
pub struct Mut<'a, T: ?Sized> {
pub(crate) value: &'a mut T,
Expand Down Expand Up @@ -113,9 +103,3 @@ impl<T: ?Sized> AsMut<T> for Mut<'_, T> {
self.deref_mut()
}
}

pub(crate) enum ChangeDetectionMode {
None,
Added,
Changed
}
1 change: 0 additions & 1 deletion src/multiple_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use bevy::ecs::component::ComponentId;
use bevy::ecs::entity::Entity;
use bevy::ecs::storage::{SparseSets, Table};
use bevy::ptr::UnsafeCellDeref;
use std::ops::Deref;

/// Read-access to all components implementing a trait for a given entity.
pub struct ReadTraits<'a, Trait: ?Sized + TraitQuery> {
Expand Down
2 changes: 2 additions & 0 deletions src/one.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub struct ReadTraitFetch<'w, Trait: ?Sized> {
// After `Fetch::set_archetype` or `set_table` has been called,
// this will carry the component data and metadata for the first trait impl found in the archetype.
storage: ReadStorage<'w, Trait>,
last_change_tick: u32,
change_tick: u32,
}

enum ReadStorage<'w, Trait: ?Sized> {
Expand Down

0 comments on commit b7bad05

Please sign in to comment.