summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCollin Styles <collingstyles@gmail.com>2022-11-19 14:27:25 -0800
committerDavid Peter <mail@david-peter.de>2023-03-24 22:33:43 +0100
commit7929179a74e81f34c4b055f36e87f8953f448cc5 (patch)
tree0729ed6f238dbd9c91f326e4411b4743ef7ec31f
parent4e491c4594e4f5ae309197f92b50e2e96ad443c9 (diff)
Make `PrettyPrinter::header` an alias for `header_filename`
Fixes #2378
-rw-r--r--src/pretty_printer.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pretty_printer.rs b/src/pretty_printer.rs
index bc89d4fc..02a7a519 100644
--- a/src/pretty_printer.rs
+++ b/src/pretty_printer.rs
@@ -19,7 +19,7 @@ use crate::paging::PagingMode;
#[derive(Default)]
struct ActiveStyleComponents {
- header: bool,
+ header_filename: bool,
#[cfg(feature = "git")]
vcs_modification_markers: bool,
grid: bool,
@@ -140,7 +140,7 @@ impl<'a> PrettyPrinter<'a> {
/// Whether to show a header with the file name
pub fn header(&mut self, yes: bool) -> &mut Self {
- self.active_style_components.header = yes;
+ self.active_style_components.header_filename = yes;
self
}
@@ -277,8 +277,10 @@ impl<'a> PrettyPrinter<'a> {
if self.active_style_components.rule {
self.config.style_components.insert(StyleComponent::Rule);
}
- if self.active_style_components.header {
- self.config.style_components.insert(StyleComponent::Header);
+ if self.active_style_components.header_filename {
+ self.config
+ .style_components
+ .insert(StyleComponent::HeaderFilename);
}
if self.active_style_components.line_numbers {
self.config