Repository: bevyengine/bevy
File: crates/bevy_scene/src/scene_spawner.rs (Rust)

Code before:
/// Information about a scene instance.
#[derive(Debug)]
struct InstanceInfo {
    /// Mapping of entities from the scene world to the instance world.
    entity_map: EntityHashMap<Entity>,
    /// The parent to attach this instance to.
    parent: Option<Entity>,
}

/// Unique id identifying a scene instance.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Reflect)]
#[reflect(Debug, PartialEq, Hash, Clone)]
pub struct InstanceId(Uuid);

impl InstanceId {
    fn new() -> Self {
        InstanceId(Uuid::new_v4())
    }
}

/// Set enum for the systems relating to scene spawning
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)]
pub enum SceneSpawnerSystems {
    /// label for systems having to do with spawning the scene(s)
    Spawn,
}

/// Handles spawning and despawning scenes in the world, either synchronously or batched through the [`scene_spawner_system`].
///
/// Synchronous methods: (Scene operations will take effect immediately)
/// - [`spawn_sync`](Self::spawn_sync)
/// - [`spawn_dynamic_sync`](Self::spawn_dynamic_sync)
/// - [`despawn_sync`](Self::despawn_sync)
/// - [`despawn_dynamic_sync`](Self::despawn_dynamic_sync)
/// - [`despawn_instance_sync`](Self::despawn_instance_sync)
/// - [`update_spawned_scenes`](Self::update_spawned_scenes)
/// - [`update_spawned_dynamic_scenes`](Self::update_spawned_dynamic_scenes)
/// - [`spawn_queued_scenes`](Self::spawn_queued_scenes)
/// - [`despawn_queued_scenes`](Self::despawn_queued_scenes)
/// - [`despawn_queued_instances`](Self::despawn_queued_instances)
///
/// Deferred methods: (Scene operations will be processed when the [`scene_spawner_system`] is run)
/// - [`spawn_dynamic`](Self::spawn_dynamic)
/// - [`spawn_dynamic_as_child`](Self::spawn_dynamic_as_child)
/// - [`spawn`](Self::spawn)
/// - [`spawn_as_child`](Self::spawn_as_child)
/// - [`despawn`](Self::despawn)
/// - [`despawn_dynamic`](Self::despawn_dynamic)
/// - [`despawn_instance`](Self::despawn_instance)
#[derive(Default, Resource)]
pub struct SceneSpawner {

Review comment (bug):
```suggestion
/// Set enum for the systems relating to scene spawning.
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)]
pub enum SceneSpawnerSystems {
    /// Systems that spawn scenes.
    Spawn,
}
```

Code after:
/// Information about a scene instance.
#[derive(Debug)]
struct InstanceInfo {
    /// Mapping of entities from the scene world to the instance world.
    entity_map: EntityHashMap<Entity>,
    /// The parent to attach this instance to.
    parent: Option<Entity>,
}

/// Unique id identifying a scene instance.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Reflect)]
#[reflect(Debug, PartialEq, Hash, Clone)]
pub struct InstanceId(Uuid);

impl InstanceId {
    fn new() -> Self {
        InstanceId(Uuid::new_v4())
    }
}

/// Set enum for the systems relating to scene spawning.
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)]
pub enum SceneSpawnerSystems {
    /// Systems that spawn scenes.
    Spawn,
}

/// Handles spawning and despawning scenes in the world, either synchronously or batched through the [`scene_spawner_system`].
///
/// Synchronous methods: (Scene operations will take effect immediately)
/// - [`spawn_sync`](Self::spawn_sync)
/// - [`spawn_dynamic_sync`](Self::spawn_dynamic_sync)
/// - [`despawn_sync`](Self::despawn_sync)
/// - [`despawn_dynamic_sync`](Self::despawn_dynamic_sync)
/// - [`despawn_instance_sync`](Self::despawn_instance_sync)
/// - [`update_spawned_scenes`](Self::update_spawned_scenes)
/// - [`update_spawned_dynamic_scenes`](Self::update_spawned_dynamic_scenes)
/// - [`spawn_queued_scenes`](Self::spawn_queued_scenes)
/// - [`despawn_queued_scenes`](Self::despawn_queued_scenes)
/// - [`despawn_queued_instances`](Self::despawn_queued_instances)
///
/// Deferred methods: (Scene operations will be processed when the [`scene_spawner_system`] is run)
/// - [`spawn_dynamic`](Self::spawn_dynamic)
/// - [`spawn_dynamic_as_child`](Self::spawn_dynamic_as_child)
/// - [`spawn`](Self::spawn)
/// - [`spawn_as_child`](Self::spawn_as_child)
/// - [`despawn`](Self::despawn)
/// - [`despawn_dynamic`](Self::despawn_dynamic)
/// - [`despawn_instance`](Self::despawn_instance)
#[derive(Default, Resource)]
pub struct SceneSpawner {