Skip to content

Commit 3feaabc

Browse files
committed
Minor refactoring
1 parent c23751c commit 3feaabc

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/scene.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn replicate_into(scene: &mut DynamicScene, world: &World) {
5656
let mut entities: EntityHashMap<_> = scene
5757
.entities
5858
.drain(..)
59-
.map(|dyn_entity| (dyn_entity.entity, dyn_entity.components))
59+
.map(|e| (e.entity, e.components))
6060
.collect();
6161

6262
let registry = world.resource::<AppTypeRegistry>();
@@ -118,8 +118,9 @@ pub fn replicate_into(scene: &mut DynamicScene, world: &World) {
118118
}
119119
}
120120

121-
let dyn_entities_iter = entities
122-
.drain()
123-
.map(|(entity, components)| DynamicEntity { entity, components });
124-
scene.entities.extend(dyn_entities_iter);
121+
scene.entities.extend(
122+
entities
123+
.drain()
124+
.map(|(entity, components)| DynamicEntity { entity, components }),
125+
);
125126
}

0 commit comments

Comments
 (0)