diff options
-rw-r--r-- | examples/cat.rs | 2 | ||||
-rw-r--r-- | src/bin/bat/app.rs | 2 | ||||
-rw-r--r-- | src/style.rs | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/examples/cat.rs b/examples/cat.rs index ac653697..9171e6ad 100644 --- a/examples/cat.rs +++ b/examples/cat.rs @@ -9,7 +9,7 @@ fn main() { .style_components(&[ StyleComponent::Header, StyleComponent::Grid, - StyleComponent::Numbers, + StyleComponent::LineNumbers, ]) .input_files(std::env::args_os().skip(1)) .print() diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index f93c1310..2adee7d8 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -277,7 +277,7 @@ impl App { if matches.value_of("decorations") == Some("never") { HashSet::new() } else if matches.is_present("number") { - [StyleComponent::Numbers].iter().cloned().collect() + [StyleComponent::LineNumbers].iter().cloned().collect() } else if matches.is_present("plain") { [StyleComponent::Plain].iter().cloned().collect() } else { diff --git a/src/style.rs b/src/style.rs index 1821e495..ffa232ab 100644 --- a/src/style.rs +++ b/src/style.rs @@ -9,7 +9,7 @@ pub enum StyleComponent { Changes, Grid, Header, - Numbers, + LineNumbers, Snip, Full, Plain, @@ -28,13 +28,13 @@ impl StyleComponent { StyleComponent::Changes => &[StyleComponent::Changes], StyleComponent::Grid => &[StyleComponent::Grid], StyleComponent::Header => &[StyleComponent::Header], - StyleComponent::Numbers => &[StyleComponent::Numbers], + StyleComponent::LineNumbers => &[StyleComponent::LineNumbers], StyleComponent::Snip => &[StyleComponent::Snip], StyleComponent::Full => &[ StyleComponent::Changes, StyleComponent::Grid, StyleComponent::Header, - StyleComponent::Numbers, + StyleComponent::LineNumbers, StyleComponent::Snip, ], StyleComponent::Plain => &[], @@ -51,7 +51,7 @@ impl FromStr for StyleComponent { "changes" => Ok(StyleComponent::Changes), "grid" => Ok(StyleComponent::Grid), "header" => Ok(StyleComponent::Header), - "numbers" => Ok(StyleComponent::Numbers), + "numbers" => Ok(StyleComponent::LineNumbers), "snip" => Ok(StyleComponent::Snip), "full" => Ok(StyleComponent::Full), "plain" => Ok(StyleComponent::Plain), @@ -82,7 +82,7 @@ impl StyleComponents { } pub fn numbers(&self) -> bool { - self.0.contains(&StyleComponent::Numbers) + self.0.contains(&StyleComponent::LineNumbers) } pub fn snip(&self) -> bool { |