You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: door_placement.rs
    path of file: ./repos/rustrogueliketutorial/chapter-61-townportal/src/map_builders
    
    the code of the file until where you have to start completion: use super::{MetaMapBuilder, BuilderMap, TileType };
use rltk::RandomNumberGenerator;

pub 
    
    fn doors(&mut self, rng : &mut RandomNumberGenerator, build_data : &mut BuilderMap) {
        if let Some(halls_original) = &build_data.corridors {
            let halls = halls_original.clone(); // To avoid nested borrowing
            for hall in halls.iter() {
                if hall.len() > 2 { // We aren't interested in tiny corridors
                    if self.door_possible(build_data, hall[0]) {
                        build_data.spawn_list.push((hall[0], "Door".to_string()));
                    }
                }
            }
        } else {
            // There are no corridors - scan for possible places
            let tiles = build_data.map.tiles.clone();
            for (i, tile) in tiles.iter().enumerate() {
                if *tile == TileType::Floor && self.door_possible(build_data, i) && rng.roll_dice(1,3)==1 {
                    build_data.spawn_list.push((i, "Door".to_string()));
                }
            }
        }
    }