diff options
author | pierresy <pierre-henri.symoneaux@alcatel-lucent.com> | 2016-01-17 23:00:54 +0100 |
---|---|---|
committer | pierresy <pierre-henri.symoneaux@alcatel-lucent.com> | 2016-01-17 23:00:54 +0100 |
commit | 7933962dc38d6dc7e0cad206d24555ed15ee7dd1 (patch) | |
tree | 0892f70e2a5737afca42c1fe3eac9c3f2ff32700 /src/format.rs | |
parent | cad4b3cb9361ef3d999d06a9de03ab9d1ff1cb0e (diff) |
Implemented Default for TableFormat and LineSeparator
Diffstat (limited to 'src/format.rs')
-rw-r--r-- | src/format.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/format.rs b/src/format.rs index acffad6..a08aa55 100644 --- a/src/format.rs +++ b/src/format.rs @@ -69,6 +69,12 @@ impl LineSeparator { }
}
+impl Default for LineSeparator {
+ fn default() -> Self {
+ return LineSeparator::new('-', '+', '+', '+');
+ }
+}
+
/// Contains the table formatting rules
#[derive(Clone, Debug)]
pub struct TableFormat {
@@ -88,6 +94,12 @@ pub struct TableFormat { bottom_sep: Option<LineSeparator>
}
+impl Default for TableFormat {
+ fn default() -> Self {
+ return TableFormat::new(None, None, None);
+ }
+}
+
impl TableFormat {
/// Create a new TableFormat.
|