diff options
author | sharkdp <davidpeter@web.de> | 2018-05-06 14:53:52 +0200 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2018-05-06 15:10:46 +0200 |
commit | 3fa70deaa7777af32b9480961b91bf70c2d04f20 (patch) | |
tree | e8d265ba7923e6dbfb0eabf22590650d2f97a190 /src/terminal.rs | |
parent | d4553c6b386c2c71a9a177c3cdcb530eaf7ec59b (diff) |
Run 'cargo fmt' and enforce via Travis
Diffstat (limited to 'src/terminal.rs')
-rw-r--r-- | src/terminal.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/terminal.rs b/src/terminal.rs index 0e26376b..01c2459b 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -1,7 +1,7 @@ use std::fmt::Write; -use ansi_term::Style; use ansi_term::Colour::{Fixed, RGB}; +use ansi_term::Style; use syntect::highlighting; /// Approximate a 24 bit color value by a 8 bit ANSI code @@ -26,7 +26,11 @@ fn rgb2ansi(r: u8, g: u8, b: u8) -> u8 { } } -pub fn as_terminal_escaped(v: &[(highlighting::Style, &str)], true_color: bool, colored: bool) -> String { +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 { |