aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-27 16:55:31 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-27 16:55:31 -0600
commit5197d769bb2fea50975122a4ebba89c07c712839 (patch)
tree779a305a7cceada70233c6004e03d576dcadde3d /src
parent66e8fae975a96033277ba7341f7ad40912de1b41 (diff)
downloadmakers-5197d769bb2fea50975122a4ebba89c07c712839.tar.gz
makers-5197d769bb2fea50975122a4ebba89c07c712839.zip
don't builder when we don't need to builder
Diffstat (limited to 'src')
-rw-r--r--src/makefile/mod.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index e07cdfd..1ce335d 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -84,15 +84,15 @@ impl<'a> Makefile<'a> {
}
}
- pub fn and_read_file(&mut self, path: impl AsRef<Path>) -> &mut Self {
+ pub fn and_read_file(&mut self, path: impl AsRef<Path>) {
let file = File::open(path);
// TODO handle errors
let file = file.expect("couldn't open makefile!");
let file_reader = BufReader::new(file);
- self.and_read(file_reader)
+ self.and_read(file_reader);
}
- pub fn and_read(&mut self, source: impl BufRead) -> &mut Self {
+ pub fn and_read(&mut self, source: impl BufRead) {
let mut lines_iter = source.lines().enumerate().peekable();
while let Some((line_number, line)) = lines_iter.next() {
// TODO handle I/O errors at all
@@ -356,7 +356,6 @@ impl<'a> Makefile<'a> {
}
}
}
- self
}
fn special_target_has_prereq(&self, target: &str, name: &str) -> bool {