aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/mod.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-01 17:59:53 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-01 17:59:53 -0600
commitf1beff707ab2b47ddb6e0c9ec972b844cf6d5510 (patch)
treef1d1905d84bb52849b214f1f8138a2ace43db7e4 /src/makefile/mod.rs
parent093e58de2ffc8243e6ff929f50a2aaa6ef60848b (diff)
downloadmakers-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.rs4
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))?;