From 2040ec8190518db84d1651c596950488750ab567 Mon Sep 17 00:00:00 2001 From: Pierre-Henri Symoneaux Date: Sun, 25 Aug 2019 20:19:20 +0200 Subject: Fixed a few clippy warnings (but not all) --- src/format.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/format.rs') diff --git a/src/format.rs b/src/format.rs index ddf6713..9339348 100644 --- a/src/format.rs +++ b/src/format.rs @@ -60,10 +60,10 @@ impl LineSeparator { /// and `junc` is the one used for junctions between columns and lines pub fn new(line: char, junc: char, ljunc: char, rjunc: char) -> LineSeparator { LineSeparator { - line: line, - junc: junc, - ljunc: ljunc, - rjunc: rjunc, + line, + junc, + ljunc, + rjunc, } } @@ -80,7 +80,7 @@ impl LineSeparator { if lborder { out.write_all(Utf8Char::from(self.ljunc).as_bytes())?; } - let mut iter = col_width.into_iter().peekable(); + let mut iter = col_width.iter().peekable(); while let Some(width) = iter.next() { for _ in 0..width + padding.0 + padding.1 { out.write_all(Utf8Char::from(self.line).as_bytes())?; -- cgit v1.2.3