diff options
author | Pierre-Henri Symoneaux <pierre.henri.symoneaux@gmail.com> | 2019-08-25 20:19:20 +0200 |
---|---|---|
committer | Pierre-Henri Symoneaux <pierre.henri.symoneaux@gmail.com> | 2019-08-25 20:19:20 +0200 |
commit | 2040ec8190518db84d1651c596950488750ab567 (patch) | |
tree | d318f6a8e2b59c5c208f62c92ad9d9cd65d28d3a /src/lib.rs | |
parent | cb6a033d7a212674c356c1a8365511abe2b4fca9 (diff) |
Fixed a few clippy warnings (but not all)
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3,7 +3,7 @@ unused_import_braces, unused_qualifications)] //! A formatted and aligned table printer written in rust -//! + #[macro_use] extern crate lazy_static; @@ -145,7 +145,7 @@ impl<'a> TableSlice<'a> { .print_line_separator(out, &col_width, LinePosition::Title)?; } // Print rows - let mut iter = self.rows.into_iter().peekable(); + let mut iter = self.rows.iter().peekable(); while let Some(r) = iter.next() { height += f(r, out, self.format, &col_width)?; if iter.peek().is_some() { @@ -214,7 +214,7 @@ impl Table { /// Create a table initialized with `rows` pub fn init(rows: Vec<Row>) -> Table { Table { - rows: rows, + rows, titles: Box::new(None), format: Box::new(*consts::FORMAT_DEFAULT), } |