From 39e4bf80b8f9a72f3235ee21580bb03e301175fb Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 3 May 2015 11:36:32 +0200 Subject: vtcol.rs: implement pretty printing of schemes loaded from files --- vtcol.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vtcol.rs b/vtcol.rs index 785c533..0b86fc2 100644 --- a/vtcol.rs +++ b/vtcol.rs @@ -231,7 +231,7 @@ impl<'a> Job<'a> { Scheme::Default => Job::dump_scheme(&DEFAULT_COLORS), Scheme::SolarizedDark => Job::dump_scheme(&SOLARIZED_COLORS_DARK), Scheme::SolarizedLight => Job::dump_scheme(&SOLARIZED_COLORS_LIGHT), - Scheme::Custom(_fname) => panic!("cannot dump custom palette, yet") + Scheme::Custom(fname) => Job::dump_palette(Palette::from_file(&fname)) } } @@ -242,6 +242,12 @@ impl<'a> Job<'a> { pal.dump() } + fn + dump_palette (pal : Palette) + { + pal.dump() + } + } /* [impl Job] */ /* Rust appears to come with two wrappers for ``ioctl(2)``, but neither can be utilized for our @@ -402,7 +408,6 @@ impl Palette { panic!("invalid color definition: {}", line); } let col = line.slice_chars(idx, idx + RAW_COLEXPR_SIZE); - println!("raw color: {}", col); let (r, g, b) = rgb_of_hex_triplet(col); pal[pal_idx + 0_us] = r; -- cgit v1.2.3