1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-23 17:03:18 +00:00

Remove unnecessary space if there are no decorations

This commit is contained in:
Ezinwa Okpoechi
2018-05-24 12:05:33 +02:00
committed by David Peter
parent 2ea3758c4b
commit a452467e06
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -84,11 +84,11 @@ impl<'a> Printer<'a> {
write!(
self.handle,
"{}{} ",
"{}{}",
" ".repeat(self.panel_width),
self.colors
.grid
.paint(if self.panel_width > 0 { "" } else { "" }),
.paint(if self.panel_width > 0 { " " } else { "" }),
)?;
} else {
write!(self.handle, "{}", " ".repeat(self.panel_width))?;
@@ -1,5 +1,5 @@
────────────────────────────────────────────────────────────────────────────────
File: sample.rs
File: sample.rs
────────────────────────────────────────────────────────────────────────────────
struct Rectangle {
width: u32,