diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2015-05-03 11:36:32 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2015-05-03 11:36:32 +0200 |
commit | 39e4bf80b8f9a72f3235ee21580bb03e301175fb (patch) | |
tree | e9fe1dff5f53bc821f5d9ccc1bdb65b9dc6292ea | |
parent | 2a8d02b0cf0c9f37f090f6cf21a155a894904ad3 (diff) | |
download | vtcol-39e4bf80b8f9a72f3235ee21580bb03e301175fb.tar.gz |
vtcol.rs: implement pretty printing of schemes loaded from files
-rw-r--r-- | vtcol.rs | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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; |