From 6c230e6407963a42cc7f5e6ff999bcef79fd5c50 Mon Sep 17 00:00:00 2001 From: Joel Wachsler Date: Sun, 10 Jul 2022 15:55:46 +0000 Subject: [PATCH] Fix lint warnings --- md-parser/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/md-parser/src/lib.rs b/md-parser/src/lib.rs index fbe1876..184e994 100644 --- a/md-parser/src/lib.rs +++ b/md-parser/src/lib.rs @@ -16,9 +16,7 @@ pub struct Table { impl Table { fn raw(&self) -> String { - let mut output = Vec::new(); - output.push(self.header.raw.clone()); - output.push(self.split.clone()); + let mut output = vec![self.header.raw.clone(), self.split.clone()]; for row in self.rows.clone() { output.push(row.raw); } @@ -84,7 +82,7 @@ impl MdToken { fn from(content: &str) -> Vec { let mut output = Vec::new(); - let mut iter = content.lines().into_iter(); + let mut iter = content.lines(); while let Some(line) = iter.next() { // assume this is a table if line.contains('|') {