From f1beff707ab2b47ddb6e0c9ec972b844cf6d5510 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 1 Apr 2021 17:59:53 -0600 Subject: don't double-peekable the iterator smdh --- src/makefile/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs index af8ca81..00c5051 100644 --- a/src/makefile/mod.rs +++ b/src/makefile/mod.rs @@ -4,6 +4,7 @@ use std::env; use std::fmt; use std::fs::File; use std::io::{BufRead, BufReader}; +use std::iter::Peekable; use std::path::Path; use std::rc::Rc; @@ -235,9 +236,8 @@ impl<'a> Makefile<'a> { &mut self, line_tokens: &TokenString, line_number: usize, - lines_iter: &mut impl Iterator)>, + lines_iter: &mut Peekable)>>, ) -> Result<()> { - let mut lines_iter = lines_iter.peekable(); let (targets, not_targets) = line_tokens .split_once(':') .ok_or_else(|| eyre!("read_rule couldn't find a ':' on line {}", line_number))?; -- cgit v1.2.3