summaryrefslogtreecommitdiffstats
path: root/src/row.rs
diff options
context:
space:
mode:
authorpierresy <pierre-henri.symoneaux@alcatel-lucent.com>2016-01-17 23:15:06 +0100
committerpierresy <pierre-henri.symoneaux@alcatel-lucent.com>2016-01-17 23:15:06 +0100
commit8fbd2af468da9eddf2f2e21238141212f4c88e88 (patch)
tree29635f8faecb7f6acba80b0a10ba502064c0d250 /src/row.rs
parent7933962dc38d6dc7e0cad206d24555ed15ee7dd1 (diff)
Implemented padding customization
Diffstat (limited to 'src/row.rs')
-rw-r--r--src/row.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/row.rs b/src/row.rs
index 1c39cc1..1edfa92 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -101,11 +101,14 @@ impl Row {
{
for i in 0..self.get_height() {
try!(format.print_column_separator(out, ColumnPosition::Left));
+ let (lp, rp) = format.get_padding();
for j in 0..col_width.len() {
+ try!(out.write(&vec![' ' as u8; lp]));
match self.get_cell(j) {
Some(ref c) => try!(f(c, out, i, col_width[j])),
None => try!(f(&Cell::default(), out, i, col_width[j]))
};
+ try!(out.write(&vec![' ' as u8; rp]));
if j < col_width.len() - 1 {
try!(format.print_column_separator(out, ColumnPosition::Intern));
}