1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 23:44:38 +00:00

remove unnecessary clones

This commit is contained in:
mat 2025-02-03 19:28:25 +00:00
commit ad41d45ba0

View file

@ -289,10 +289,8 @@ pub fn process_packet_events(ecs: &mut World) {
let map = instance_holder.instance.read().registries.map.clone();
let new_registries = &mut weak_instance.write().registries;
// add the registries from this instance to the weak instance
for (registry_name, registry) in &map {
new_registries
.map
.insert(registry_name.clone(), registry.clone());
for (registry_name, registry) in map {
new_registries.map.insert(registry_name, registry);
}
}
instance_holder.instance = weak_instance;