diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-01 17:59:53 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-01 17:59:53 -0600 |
commit | f1beff707ab2b47ddb6e0c9ec972b844cf6d5510 (patch) | |
tree | f1d1905d84bb52849b214f1f8138a2ace43db7e4 /src/makefile/mod.rs | |
parent | 093e58de2ffc8243e6ff929f50a2aaa6ef60848b (diff) | |
download | makers-f1beff707ab2b47ddb6e0c9ec972b844cf6d5510.tar.gz makers-f1beff707ab2b47ddb6e0c9ec972b844cf6d5510.zip |
don't double-peekable the iterator smdh
Diffstat (limited to 'src/makefile/mod.rs')
-rw-r--r-- | src/makefile/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Item = (usize, Result<String>)>, + lines_iter: &mut Peekable<impl Iterator<Item = (usize, Result<String>)>>, ) -> 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))?; |