From 87101064f03eaacee2cb279d3421ce31854602d1 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Thu, 30 Apr 2020 20:18:37 +0100 Subject: [PATCH] no need for assignment here --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6d5c5dc..70c868f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -124,9 +124,8 @@ fn segments_from_string(string: String) -> Vec { // are we inside `"""\n...\n"""`? if so, ignore empty lines let mut inside_escaped_block = false; let mut current_segment : Vec = Vec::new(); - let lines: Vec<&str> = string.lines().collect(); - for line in lines { + for line in string.lines() { if line == "\"\"\"" { inside_escaped_block = ! inside_escaped_block; }