diff --git a/Cargo.lock b/Cargo.lock index bf6af4e8..7cddac68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -235,7 +235,6 @@ dependencies = [ "mach2", "nvml-wrapper", "once_cell", - "phf", "predicates", "procfs", "regex", @@ -1290,48 +1289,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "phf" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" -dependencies = [ - "phf_macros", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" -dependencies = [ - "phf_shared", - "rand", -] - -[[package]] -name = "phf_macros" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "phf_shared" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project-lite" version = "0.2.9" @@ -1418,21 +1375,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - [[package]] name = "rayon" version = "1.5.2" @@ -1608,12 +1550,6 @@ dependencies = [ "libc", ] -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - [[package]] name = "slab" version = "0.4.6" diff --git a/Cargo.toml b/Cargo.toml index 9dcd1b38..61f68e20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,7 +79,6 @@ indexmap = "1.8.1" itertools = "0.10.3" kstring = { version = "2.0.0", features = ["arc"] } log = { version = "0.4.16", optional = true } -phf = { version = "0.11", features = ["macros"] } nvml-wrapper = { version = "0.8.0", optional = true } once_cell = "1.5.2" regex = "1.5.5" diff --git a/src/canvas/canvas_colours/colour_utils.rs b/src/canvas/canvas_colours/colour_utils.rs index 4948d5c4..c5c4e294 100644 --- a/src/canvas/canvas_colours/colour_utils.rs +++ b/src/canvas/canvas_colours/colour_utils.rs @@ -10,27 +10,6 @@ pub const HIGHLIGHT_COLOUR: Color = Color::LightBlue; pub const AVG_COLOUR: Color = Color::Red; pub const ALL_COLOUR: Color = Color::Green; -static COLOR_LOOKUP_TABLE: phf::Map<&'static str, Color> = phf::phf_map! { - "reset" => Color::Reset, - "black" => Color::Black, - "red" => Color::Red, - "green" => Color::Green, - "yellow" => Color::Yellow, - "blue" => Color::Blue, - "magenta" => Color::Magenta, - "cyan" => Color::Cyan, - "gray" => Color::Gray, - "grey" => Color::Gray, - "darkgray" => Color::DarkGray, - "lightred" => Color::LightRed, - "lightgreen" => Color::LightGreen, - "lightyellow" => Color::LightYellow, - "lightblue" => Color::LightBlue, - "lightmagenta" => Color::LightMagenta, - "lightcyan" => Color::LightCyan, - "white" => Color::White, -}; - pub fn convert_hex_to_color(hex: &str) -> error::Result { fn hex_err(hex: &str) -> error::Result { Err( @@ -140,32 +119,99 @@ pub fn get_style_from_rgb(rgb_str: &str) -> error::Result