summaryrefslogtreecommitdiffstats
path: root/src/format.rs
diff options
context:
space:
mode:
authorpierresy <pierre-henri.symoneaux@alcatel-lucent.com>2015-11-07 12:18:50 +0100
committerpierresy <pierre-henri.symoneaux@alcatel-lucent.com>2015-11-07 12:18:50 +0100
commit0837f83b7d50dfcd1d17025c6f09cde810c1b5c7 (patch)
treea5fc5d3882ee0d51aa2948ca8eb1c58e6de88176 /src/format.rs
parentd499b48860de79733b41ad61f9f3b4657a614554 (diff)
Added dependency "term" and support to styles (color, etc ...)
Diffstat (limited to 'src/format.rs')
-rw-r--r--src/format.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/format.rs b/src/format.rs
index 048d6d1..fe79b38 100644
--- a/src/format.rs
+++ b/src/format.rs
@@ -28,7 +28,7 @@ impl LineSeparator {
}
/// Print a full line separator to `out`. `col_width` is a slice containing the width of each column
- pub fn print<T: Write>(&self, out: &mut T, col_width: &[usize]) -> Result<(), Error> {
+ pub fn print<T: Write+?Sized>(&self, out: &mut T, col_width: &[usize]) -> Result<(), Error> {
try!(out.write_all(&self.cross));
for width in col_width {
try!(out.write_all(&vec![self.line[0]; width+2]));
@@ -59,7 +59,7 @@ impl TableFormat {
}
/// Print a full line separator to `out`. `col_width` is a slice containing the width of each column
- pub fn print_line_separator<T: Write>(&self, out: &mut T, col_width: &[usize]) -> Result<(), Error> {
+ pub fn print_line_separator<T: Write+?Sized>(&self, out: &mut T, col_width: &[usize]) -> Result<(), Error> {
if let Some(ref l) = self.line_sep {
return l.print(out, col_width);
}
@@ -67,7 +67,7 @@ impl TableFormat {
}
/// Print a full title separator to `out`. `col_width` is a slice containing the width of each column
- pub fn print_title_separator<T: Write>(&self, out: &mut T, col_width: &[usize]) -> Result<(), Error> {
+ pub fn print_title_separator<T: Write+?Sized>(&self, out: &mut T, col_width: &[usize]) -> Result<(), Error> {
if let Some(ref l) = self.title_sep {
return l.print(out, col_width);
}
@@ -75,7 +75,7 @@ impl TableFormat {
}
/// Print a column separator to `out`
- pub fn print_column_separator<T: Write>(&self, out: &mut T) -> Result<(), Error> {
+ pub fn print_column_separator<T: Write+?Sized>(&self, out: &mut T) -> Result<(), Error> {
return out.write_all(&self.col_sep);
}
}