on master help sign in
Added printing of "<BINARY>" for binary files in the interactive mode if header decorations are turned off
commitf37dbb80a864716a3d55d703ff66203bbfc4cc49 authorMaksim Panfilov <fendever@gmail.com> dateWed 24 Apr 2019, 17:11 (8 years ago) parent0a1e08d
1 file changed+3
src/printer.rs+3
src/printer.rs+3
@@ -194,6 +194,9 @@ impl<'a> InteractivePrinter<'a> {
194194impl<'a> Printer for InteractivePrinter<'a> {
195195 fn print_header(&mut self, handle: &mut Write, file: InputFile) -> Result<()> {
196196 if !self.config.output_components.header() {
197+ if ContentType::BINARY == self.content_type {
198+ writeln!(handle, "<BINARY>")?;
199+ }
197200 return Ok(());
198201 }
199202