mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-26 09:43:51 +01:00
Run formatting for bat_style changes
This commit is contained in:
parent
b9c556a0b6
commit
cf24986edb
15
src/app.rs
15
src/app.rs
@ -12,7 +12,7 @@ use console::Term;
|
|||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use ansi_term;
|
use ansi_term;
|
||||||
|
|
||||||
use assets::{BAT_THEME_DEFAULT, BAT_STYLE_DEFAULT};
|
use assets::{BAT_STYLE_DEFAULT, BAT_THEME_DEFAULT};
|
||||||
use errors::*;
|
use errors::*;
|
||||||
use line_range::LineRange;
|
use line_range::LineRange;
|
||||||
use style::{OutputComponent, OutputComponents, OutputWrap};
|
use style::{OutputComponent, OutputComponents, OutputWrap};
|
||||||
@ -441,12 +441,13 @@ impl App {
|
|||||||
} else {
|
} else {
|
||||||
let style = env::var("BAT_STYLE").unwrap_or(String::from(BAT_STYLE_DEFAULT));
|
let style = env::var("BAT_STYLE").unwrap_or(String::from(BAT_STYLE_DEFAULT));
|
||||||
match OutputComponent::from_str(&style) {
|
match OutputComponent::from_str(&style) {
|
||||||
Ok(s) => [s].iter()
|
Ok(s) => [s]
|
||||||
.map(|style| style.components(self.interactive_output))
|
.iter()
|
||||||
.fold(HashSet::new(), |mut acc, components| {
|
.map(|style| style.components(self.interactive_output))
|
||||||
acc.extend(components.iter().cloned());
|
.fold(HashSet::new(), |mut acc, components| {
|
||||||
acc
|
acc.extend(components.iter().cloned());
|
||||||
}),
|
acc
|
||||||
|
}),
|
||||||
Err(_) => HashSet::new(),
|
Err(_) => HashSet::new(),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user