fn assert_markers_are_unique<M: Marker>(world: &mut World)
    where
        <M as Marker>::Identifier: Clone + Eq + Hash,
    {
        world.exec(|(ents, markers): (Entities, ReadStorage<M>)| {
            use std::collections::HashSet;

            let marker_ids: Vec<_> = (&ents, &markers)
                .join()
                .map(|(_entity, marker)| marker.id())
                .collect();

            let marker_id_set: HashSet<_> = marker_ids.iter().cloned().collect();

            assert_eq!(marker_ids.len(), marker_id_set.len());
        });
    }
/// Ensure there are no duplicate marker .ids() in the world
Ensure there are no duplicate marker .ids() in the world
Ensure there are no duplicate marker . ids () in the world
fn assert_markers_are_unique<M: Marker>(world: &mut World)
    where
        <M as Marker>::Identifier: Clone + Eq + Hash,
    {
        world.exec(|(ents, markers): (Entities, ReadStorage<M>)| {
            use std::collections::HashSet;
            let marker_ids: Vec<_> = (&ents, &markers)
                .join()
                .map(|(_entity, marker)| marker.id())
                .collect();
            let marker_id_set: HashSet<_> = marker_ids.iter().cloned().collect();
            assert_eq!(marker_ids.len(), marker_id_set.len());
        });
    }
fn assert_markers_are_unique < M : Marker > ( world : & mut World ) where < M as Marker > :: Identifier : Clone + Eq + Hash , { world . exec ( | ( ents , markers ) : ( Entities , ReadStorage < M > ) | { use std :: collections :: HashSet ; let marker_ids : Vec < _ > = ( & ents , & markers ) . join ( ) . map ( | ( _entity , marker ) | marker . id ( ) ) . collect ( ) ; let marker_id_set : HashSet < _ > = marker_ids . iter ( ) . cloned ( ) . collect ( ) ; assert_eq ! ( marker_ids len ( ) marker_id_set len ( ) ) ; } ) ; }
Ensure there are no duplicate marker .ids() in the world
Ensure there are no duplicate marker . ids () in the world
world
&mut World