summaryrefslogtreecommitdiffstats
path: root/src/format.rs
diff options
context:
space:
mode:
authorPierre-Henri Symoneaux <pierre-henri.symoneaux@nokia.com>2018-02-19 22:06:44 +0100
committerPierre-Henri Symoneaux <pierre-henri.symoneaux@nokia.com>2018-02-19 22:06:44 +0100
commitef0dea770fb3cde2444f69595cea9efb9101a910 (patch)
treef5cfcb53181370c471423dab57da2656638f2d17 /src/format.rs
parentf38be5c886e2462f074ce849eb9aa6815900a7e3 (diff)
Added Hash & Eq derive. Implemented Extend on Row and Table
Diffstat (limited to 'src/format.rs')
-rw-r--r--src/format.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/format.rs b/src/format.rs
index 4e7a671..25f07ea 100644
--- a/src/format.rs
+++ b/src/format.rs
@@ -7,7 +7,7 @@ use encode_unicode::Utf8Char;
use super::utils::NEWLINE;
/// Alignment for cell's content
-#[derive(Clone, Debug, PartialEq, Copy, Hash)]
+#[derive(Clone, Debug, PartialEq, Copy, Hash, Eq)]
pub enum Alignment {
/// Align left
LEFT,
@@ -18,7 +18,7 @@ pub enum Alignment {
}
/// Position of a line separator in a table
-#[derive(Clone, Debug, PartialEq, Copy, Hash)]
+#[derive(Clone, Debug, PartialEq, Copy, Hash, Eq)]
pub enum LinePosition {
/// Table's border on top
Top,
@@ -32,7 +32,7 @@ pub enum LinePosition {
}
/// Position of a column separator in a row
-#[derive(Clone, Debug, PartialEq, Copy, Hash)]
+#[derive(Clone, Debug, PartialEq, Copy, Hash, Eq)]
pub enum ColumnPosition {
/// Left table's border
Left,
@@ -43,7 +43,7 @@ pub enum ColumnPosition {
}
/// Contains the character used for printing a line separator
-#[derive(Clone, Debug, Copy, Hash)]
+#[derive(Clone, Debug, Copy, Hash, PartialEq, Eq)]
pub struct LineSeparator {
/// Line separator
line: char,
@@ -113,7 +113,7 @@ impl Default for LineSeparator {
}
/// Contains the table formatting rules
-#[derive(Clone, Debug, Copy, Hash)]
+#[derive(Clone, Debug, Copy, Hash, PartialEq, Eq)]
pub struct TableFormat {
/// Optional column separator character
csep: Option<char>,