pub fn delete_hierarchy(root: Entity, world: &mut World) -> Result<(), WrongGeneration> {
    let entities = {
        iter::once(root)
            .chain(
                world
                    .read_resource::<ParentHierarchy>()
                    .all_children_iter(root),
            )
            .collect::<Vec<Entity>>()
    };
    world.delete_entities(&entities)
}
// delete the specified root entity and all of its descendents as specified
// by the Parent component and maintained by the ParentHierarchy resource
delete the specified root entity and all of its descendents as specified
by the Parent component and maintained by the ParentHierarchy resource
delete the specified root entity and all of its descendents as specified by the Parent component and maintained by the ParentHierarchy resource
pub fn delete_hierarchy(root: Entity, world: &mut World) -> Result<(), WrongGeneration> {
    let entities = {
        iter::once(root)
            .chain(
                world
                    .read_resource::<ParentHierarchy>()
                    .all_children_iter(root),
            )
            .collect::<Vec<Entity>>()
    };
    world.delete_entities(&entities)
}
pub fn delete_hierarchy ( root : Entity , world : & mut World ) -> Result < ( ) , WrongGeneration > { let entities = { iter :: once ( root ) . chain ( world . read_resource :: < ParentHierarchy > ( ) . all_children_iter ( root ) , ) . collect :: < Vec < Entity > > ( ) } ; world . delete_entities ( & entities ) }
delete the specified root entity and all of its descendents as specified
by the Parent component and maintained by the ParentHierarchy resource
delete the specified root entity and all of its descendents as specified by the Parent component and maintained by the ParentHierarchy resource
root
Entity
world
&mut World
root
Entity
world
&mut World