Skip to content

Commit

Permalink
needless_pass_by_ref_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
ManevilleF committed Sep 2, 2023
1 parent 32e21c7 commit c85d6d4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions crates/bevy_ecs/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ impl BundleInfo {
&'b self,
entities: &'a mut Entities,
archetypes: &'a mut Archetypes,
components: &mut Components,
components: &Components,
storages: &'a mut Storages,
archetype_id: ArchetypeId,
change_tick: Tick,
Expand Down Expand Up @@ -409,7 +409,7 @@ impl BundleInfo {
&'b self,
entities: &'a mut Entities,
archetypes: &'a mut Archetypes,
components: &mut Components,
components: &Components,
storages: &'a mut Storages,
change_tick: Tick,
) -> BundleSpawner<'a, 'b> {
Expand Down Expand Up @@ -495,7 +495,7 @@ impl BundleInfo {
&self,
archetypes: &mut Archetypes,
storages: &mut Storages,
components: &mut Components,
components: &Components,
archetype_id: ArchetypeId,
) -> ArchetypeId {
if let Some(add_bundle_id) = archetypes[archetype_id].edges().get_add_bundle(self.id) {
Expand Down Expand Up @@ -853,7 +853,7 @@ impl Bundles {
/// provided [`Components`].
pub(crate) fn init_dynamic_info(
&mut self,
components: &mut Components,
components: &Components,
component_ids: &[ComponentId],
) -> (&BundleInfo, &Vec<StorageType>) {
let bundle_infos = &mut self.bundle_infos;
Expand Down Expand Up @@ -883,7 +883,7 @@ impl Bundles {
/// Panics if the provided [`ComponentId`] does not exist in the provided [`Components`].
pub(crate) fn init_component_info(
&mut self,
components: &mut Components,
components: &Components,
component_id: ComponentId,
) -> (&BundleInfo, StorageType) {
let bundle_infos = &mut self.bundle_infos;
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_ecs/src/world/entity_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ impl<'w> EntityWorldMut<'w> {
let mut bundle_inserter = bundle_info.get_bundle_inserter(
&mut self.world.entities,
&mut self.world.archetypes,
&mut self.world.components,
&self.world.components,
&mut self.world.storages,
self.location.archetype_id,
change_tick,
Expand Down Expand Up @@ -613,7 +613,7 @@ impl<'w> EntityWorldMut<'w> {
let bundle_inserter = bundle_info.get_bundle_inserter(
&mut self.world.entities,
&mut self.world.archetypes,
&mut self.world.components,
&self.world.components,
&mut self.world.storages,
self.location.archetype_id,
change_tick,
Expand Down Expand Up @@ -656,7 +656,7 @@ impl<'w> EntityWorldMut<'w> {
let bundle_inserter = bundle_info.get_bundle_inserter(
&mut self.world.entities,
&mut self.world.archetypes,
&mut self.world.components,
&self.world.components,
&mut self.world.storages,
self.location.archetype_id,
change_tick,
Expand Down Expand Up @@ -1084,7 +1084,7 @@ unsafe fn insert_dynamic_bundle<
unsafe fn remove_bundle_from_archetype(
archetypes: &mut Archetypes,
storages: &mut Storages,
components: &mut Components,
components: &Components,
archetype_id: ArchetypeId,
bundle_info: &BundleInfo,
intersection: bool,
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_ecs/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ impl World {
let mut spawner = bundle_info.get_bundle_spawner(
&mut self.entities,
&mut self.archetypes,
&mut self.components,
&self.components,
&mut self.storages,
change_tick,
);
Expand Down Expand Up @@ -1448,7 +1448,7 @@ impl World {
let mut spawn_or_insert = SpawnOrInsert::Spawn(bundle_info.get_bundle_spawner(
&mut self.entities,
&mut self.archetypes,
&mut self.components,
&self.components,
&mut self.storages,
change_tick,
));
Expand All @@ -1471,7 +1471,7 @@ impl World {
let mut inserter = bundle_info.get_bundle_inserter(
&mut self.entities,
&mut self.archetypes,
&mut self.components,
&self.components,
&mut self.storages,
location.archetype_id,
change_tick,
Expand All @@ -1491,7 +1491,7 @@ impl World {
let mut spawner = bundle_info.get_bundle_spawner(
&mut self.entities,
&mut self.archetypes,
&mut self.components,
&self.components,
&mut self.storages,
change_tick,
);
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/world/spawn_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ where
let mut spawner = bundle_info.get_bundle_spawner(
&mut world.entities,
&mut world.archetypes,
&mut world.components,
&world.components,
&mut world.storages,
change_tick,
);
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_winit/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub(crate) fn create_windows<'a>(
mut winit_windows: NonSendMut<WinitWindows>,
mut adapters: NonSendMut<AccessKitAdapters>,
mut handlers: ResMut<WinitActionHandlers>,
mut accessibility_requested: ResMut<AccessibilityRequested>,
accessibility_requested: ResMut<AccessibilityRequested>,
#[cfg(target_arch = "wasm32")] event_channel: ResMut<CanvasParentResizeEventChannel>,
) {
for (entity, mut window) in created_windows {
Expand All @@ -64,7 +64,7 @@ pub(crate) fn create_windows<'a>(
&window,
&mut adapters,
&mut handlers,
&mut accessibility_requested,
&accessibility_requested,
);

if let Some(theme) = winit_window.theme() {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_winit/src/winit_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl WinitWindows {
window: &Window,
adapters: &mut AccessKitAdapters,
handlers: &mut WinitActionHandlers,
accessibility_requested: &mut AccessibilityRequested,
accessibility_requested: &AccessibilityRequested,
) -> &winit::window::Window {
let mut winit_window_builder = winit::window::WindowBuilder::new();

Expand Down

0 comments on commit c85d6d4

Please sign in to comment.