PR #102 Review Changes

- Reformatted code.
- Removed leftover code.
- Removed leftover comments.
- Fixed compiling on Rust 1.24.0
This commit is contained in:
eth-p committed 2018-05-12 06:32:23 -07:00
1 parent fcc36b1f79
commit fc160b0dcd
4 files changed
+61 -92

No files matched your search

+1 -23
View File
@@ -26,30 +26,8 @@ fn rgb2ansi(r: u8, g: u8, b: u8) -> u8 {
}
}
//pub fn as_terminal_escaped(
// v: &[(highlighting::Style, &str)],
// true_color: bool,
// colored: bool,
//) -> String {
// let mut s: String = String::new();
// for &(ref style, text) in v.iter() {
// let style = if !colored {
// Style::default()
// } else if true_color {
// RGB(style.foreground.r, style.foreground.g, style.foreground.b).normal()
// } else {
// let ansi = rgb2ansi(style.foreground.r, style.foreground.g, style.foreground.b);
// Fixed(ansi).normal()
// };
//
// write!(s, "{}", style.paint(text)).unwrap();
// }
//
// s
//}
pub fn as_terminal_escaped(
color:highlighting::Style,
color: highlighting::Style,
text: &str,
true_color: bool,
colored: bool,