1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-10-03 18:42:28 +01:00

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
2018-05-12 06:32:23 -07:00
parent fcc36b1f79
commit fc160b0dcd
4 changed files with 61 additions and 92 deletions

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,