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: lines.rs
    path of file: ./repos/bracket-lib/bracket-geometry/src
    
    the code of the file until where you have to start completion: use crate::prelude::{Bresenham, DistanceAlg, Point};

/// Enumeration of available 2D Distance algorithms
pub enum LineAlg {
    /// Use Bresenham's rasterization algorithm for line definition
    Bresenham,
    /// Use a vector approach to line solving.
    Vector,
}

/// Plots a line between two 2D points and returns a vector of points along the line.
pub fn line2d(algorithm: LineAlg, start: Point, end: Point) -> Vec<Point> {
    match algorithm {
        LineAlg::Bresenham => line2d_bresenham(start, end),
        LineAlg::Vector => line2d_vector(start, end),
    }
}

/// Uses a Bresenham's algorithm to plot a line between two points. On some CPUs, this is faster
/// than Bresenham.
pub fn line2d_bresenham(start: Point, end: Point) -> Vec<Point> {
    let line = Bresenham::new(start, end);
    line.chain(std::iter::once(end)).collect()
}

/// Uses a 2D vector algorithm to plot a line between two points. On some CPUs, t
    
pub fn line2d_vector(start: Point, end: Point) -> Vec<Point> {
    use ultraviolet::Vec2;

    if start == end {
        return vec![start];
    }

    let mut pos = Vec2::new(start.x as f32, start.y as f32);
    let dest = Vec2::new(end.x as f32, end.y as f32);
    let n_steps = DistanceAlg::Pythagoras.distance2d(start, end);
    let slope = (dest - pos).normalized();
    let mut result: Vec<Point> = Vec::with_capacity(n_steps as usize + 1);
    let mut count = 0;
    result.push(start);
    loop {
        pos += slope;
        let new_point = Point::new(pos.x.round() as i32, pos.y.round() as i32);
        if result[result.len() - 1] != new_point {
            if count == n_steps as i32 {
                result.push(end);
                break;
            }
            result.push(new_point);
            if new_point == end {
                // arrived
                break;
            }
        }
        count += 1;
    }

    result
}