Added printing of "<BINARY>" for binary files in the interactive mode if header decorations are turned off

This commit is contained in:
Maksim Panfilov 2019-04-24 17:11:31 +03:00 committed by David Peter
parent 0a1e08da96
commit f37dbb80a8

View File

@ -194,6 +194,9 @@ impl<'a> InteractivePrinter<'a> {
impl<'a> Printer for InteractivePrinter<'a> { impl<'a> Printer for InteractivePrinter<'a> {
fn print_header(&mut self, handle: &mut Write, file: InputFile) -> Result<()> { fn print_header(&mut self, handle: &mut Write, file: InputFile) -> Result<()> {
if !self.config.output_components.header() { if !self.config.output_components.header() {
if ContentType::BINARY == self.content_type {
writeln!(handle, "<BINARY>")?;
}
return Ok(()); return Ok(());
} }