summaryrefslogtreecommitdiffstats
path: root/src/row.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/row.rs')
-rw-r--r--src/row.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/row.rs b/src/row.rs
index ffdf890..4265fe2 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -2,7 +2,7 @@
use std::io::{Write, Error};
use std::iter::FromIterator;
-use super::utils::LINEFEED;
+use super::utils::NEWLINE;
use super::cell::Cell;
use super::format::TableFormat;
@@ -56,6 +56,11 @@ impl Row {
return self.cells.get(idx);
}
+ /// Get the mutable cell at index `idx`
+ pub fn get_mut_cell(&mut self, idx: usize) -> Option<&mut Cell> {
+ return self.cells.get_mut(idx);
+ }
+
/// Set the `cell` in the row at the given `column`
pub fn set_cell(&mut self, cell: Cell, column: usize) -> Result<(), &str> {
if column >= self.len() {
@@ -99,7 +104,7 @@ impl Row {
};
try!(format.print_column_separator(out));
}
- try!(out.write_all(LINEFEED));
+ try!(out.write_all(NEWLINE));
}
return Ok(());
}