<commit_before>use std::borrow::Cow;
use std::collections::{HashSet, VecDeque};

use glium::texture::{RawImage2d, Texture2d, Texture2dDataSink};

#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Color {
    Red,
    Yellow,
    Green,
    LightBrown,
    Purple,
    Cyan,
    Blue,
    Fuchsia,
}

pub const COLORS: &[Color] = &[
    Color::Red,
    Color::Yellow,
    Color::Green,
    Color::LightBrown,
    Color::Purple,
    Color::Cyan,
    Color::Blue,
    Color::Fuchsia,
];

impl Color {
    fn to_rgb(self) -> (u8, u8, u8) {
        match self {
            Color::Red => (255, 0, 0),
            Color::Yellow => (255, 255, 0),
            Color::Green => (0, 176, 0),
            Color::LightBrown => (255, 204, 102),
            Color::Purple => (128, 0, 128),
            Color::Cyan => (0, 255, 255),
            Color::Blue => (0, 0, 255),
            Color::Fuchsia => (255, 0, 255),
        }
    }
}

impl ::rand::Rand for Color {
    fn rand<R: ::rand::Rng>(rng: &mut R) -> Self {
        *rng.choose(COLORS).unwrap()
    }
}

pub struct Grid {
    width: u8,
    height: u8,
    num_colors: u8,

    cells: Vec<Color>,<commit_msg>Remove dead code<commit_after>use std::borrow::Cow;
use std::collections::{HashSet, VecDeque};

use glium::texture::{RawImage2d, Texture2d, Texture2dDataSink};

#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Color {
    Red,
    Yellow,
    Green,
    LightBrown,
    Purple,
    Cyan,
    Blue,
    Fuchsia,
}

pub const COLORS: &[Color] = &[
    Color::Red,
    Color::Yellow,
    Color::Green,
    Color::LightBrown,
    Color::Purple,
    Color::Cyan,
    Color::Blue,
    Color::Fuchsia,
];

impl Color {
    fn to_rgb(self) -> (u8, u8, u8) {
        match self {
            Color::Red => (255, 0, 0),
            Color::Yellow => (255, 255, 0),
            Color::Green => (0, 176, 0),
            Color::LightBrown => (255, 204, 102),
            Color::Purple => (128, 0, 128),
            Color::Cyan => (0, 255, 255),
            Color::Blue => (0, 0, 255),
            Color::Fuchsia => (255, 0, 255),
        }
    }
}

pub struct Grid {
    width: u8,
    height: u8,
    num_colors: u8,

    cells: Vec<Color>,
{'fraction_non_alphanumeric': 0.17155963302752295, 'fraction_numerical': 0.05596330275229358, 'mean_word_length': 2.2600896860986546, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1006808', 'n_tokens_mistral': 904, 'n_tokens_neox': 808, 'n_words': 188}