fn clone(&self) -> Ecs {
        let mut clone_locks = Vec::new();
        for (type_id, component) in self.components.iter() {
            clone_locks.push((type_id, component.clone_lock()));
        }

        let mut components = HashMap::new();
        for (type_id, clone_lock) in clone_locks {
            components.insert(*type_id, clone_lock());
        }

        Ecs {
            entities: self.entities.clone(),
            components: components,
        }
    }
/// For consistency, cloning an Ecs will lock all of the component storages for reading at once,
/// then clone them, then unlock them.
For consistency, cloning an Ecs will lock all of the component storages for reading at once,
then clone them, then unlock them.
For consistency cloning an Ecs will lock all of the component storages for reading at once then clone them then unlock them .
fn clone(&self) -> Ecs {
        let mut clone_locks = Vec::new();
        for (type_id, component) in self.components.iter() {
            clone_locks.push((type_id, component.clone_lock()));
        }
        let mut components = HashMap::new();
        for (type_id, clone_lock) in clone_locks {
            components.insert(*type_id, clone_lock());
        }
        Ecs {
            entities: self.entities.clone(),
            components: components,
        }
    }
fn clone ( & self ) -> Ecs { let mut clone_locks = Vec :: new ( ) ; for ( type_id , component ) in self . components . iter ( ) { clone_locks . push ( ( type_id , component . clone_lock ( ) ) ) ; } let mut components = HashMap :: new ( ) ; for ( type_id , clone_lock ) in clone_locks { components . insert ( * type_id , clone_lock ( ) ) ; } Ecs { entities : self . entities . clone ( ) , components : components , } }
For consistency, cloning an Ecs will lock all of the component storages for reading at once,
then clone them, then unlock them.
For consistency cloning an Ecs will lock all of the component storages for reading at once then clone them then unlock them .
&self
&self