# cleanup_system.rs - source
Source of the Rust file `maplibre/src/debug/cleanup_system.rs`.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12

    use crate::{context::MapContext, debug::TileDebugItem, render::render_phase::RenderPhase};

    pub fn cleanup_system(MapContext { world, .. }: &mut MapContext) {
        let Some(debug_tile_phase) = world
            .resources
            .query_mut::<&mut RenderPhase<TileDebugItem>>()
        else {
            return;
        };

        debug_tile_phase.clear();
    }