You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: aura.rs
    path of file: ./repos/veloren/common/systems/src
    
    the code of the file until where you have to start completion: use common::{
    combat,
    comp::{
        aura::{AuraChange,
    
    fn run(_job: &mut Job<Self>, read_data: Self::SystemData) {
        let mut emitters = read_data.events.get_emitters();

        // Iterate through all entities with an aura
        for (entity, pos, auras_comp, uid) in (
            &read_data.entities,
            &read_data.positions,
            &read_data.auras,
            &read_data.uids,
        )
            .join()
        {
            let mut expired_auras = Vec::<AuraKey>::new();
            // Iterate through the auras attached to this entity
            for (key, aura) in auras_comp.auras.iter() {
                // Tick the aura and subtract dt from it
                if let Some(end_time) = aura.end_time {
                    if read_data.time.0 > end_time.0 {
                        expired_auras.push(key);
                    }
                }
                let target_iter = read_data
                    .cached_spatial_grid
                    .0
                    .in_circle_aabr(pos.0.xy(), aura.radius)
                    .filter_map(|target| {
                        read_data
                            .positions
                            .get(target)
                            .and_then(|l| read_data.healths.get(target).map(|r| (l, r)))
                            .and_then(|l| read_data.uids.get(target).map(|r| (l, r)))
                            .map(|((target_pos, health), target_uid)| {
                                (
                                    target,
                                    target_pos,
                                    health,
                                    target_uid,
                                    read_data.stats.get(target),
                                )
                            })
                    });
                target_iter.for_each(|(target, target_pos, health, target_uid, stats)| {
                    let target_buffs = match read_data.buffs.get(target) {
                        Some(buff) => buff,
                        None => return,
                    };

                    // Ensure entity is within the aura radius
                    if target_pos.0.distance_squared(pos.0) < aura.radius.powi(2) {
                        // Ensure the entity is in the group we want to target
                        let same_group = |uid: Uid| {
                            read_data
                                .id_maps
                                .uid_entity(uid)
                                .and_then(|e| read_data.groups.get(e))
                                .map_or(false, |owner_group| {
                                    Some(owner_group) == read_data.groups.get(target)
                                })
                                || *target_uid == uid
                        };

                        let is_target = match aura.target {
                            AuraTarget::GroupOf(uid) => same_group(uid),
                            AuraTarget::NotGroupOf(uid) => !same_group(uid),
                            AuraTarget::All => true,
                        };

                        if is_target {
                            activate_aura(
                                key,
                                aura,
                                *uid,
                                target,
                                health,
                                target_buffs,
                                stats,
                                &read_data,
                                &mut emitters,
                            );
                        }
                    }
                });
            }
            if !expired_auras.is_empty() {
                emitters.emit(AuraEvent {
                    entity,
                    aura_change: AuraChange::RemoveByKey(expired_auras),
                });
            }
        }
    }