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: common.rs
    path of file: ./repos/rustrogueliketutorial/chapter-72-textlayers/src/map_builders
    
    the code of the file until where you have to start completion: use super::{Map, TileType};
use std::cmp::{max, min};

#[derive(PartialEq, Copy, Clone)]
#[allow(dead_code)]
pub enum Symmetry { None, Horizontal, Vertical, Both }

pub fn apply_horizontal_tunnel(ma
    
pub fn apply_horizontal_tunnel(map : &mut Map, x1:i32, x2:i32, y:i32) -> Vec<usize> {
    let mut corridor = Vec::new();
    for x in min(x1,x2) ..= max(x1,x2) {
        let idx = map.xy_idx(x, y);
        if idx > 0 && idx < map.width as usize * map.height as usize && map.tiles[idx as usize] != TileType::Floor {
            map.tiles[idx as usize] = TileType::Floor;
            corridor.push(idx as usize);
        }
    }
    corridor
}