From 87ce694f4d15d84e5737615b2768deaf866a796d Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 10 Nov 2024 22:05:44 -0700 Subject: clean up random rustrover lints --- src/makefile/input.rs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/makefile/input.rs') diff --git a/src/makefile/input.rs b/src/makefile/input.rs index fccea3b..25d33e4 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -24,7 +24,7 @@ use super::r#macro::ExportConfig; use super::r#macro::{Macro, Set as MacroSet}; use super::target::{StaticTargetSet, Target}; use super::token::{Token, TokenString}; -use super::ItemSource; +use super::{builtin_targets, ItemSource}; enum LineType { Rule, @@ -262,18 +262,10 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { }; // TODO be smart about this instead, please if !args.no_builtin_rules { - reader.built_in_targets.insert( - ".SUFFIXES".to_owned(), - Target { - name: ".SUFFIXES".into(), - prerequisites: vec![".o", ".c", ".y", ".l", ".a", ".sh", ".f"] - .into_iter() - .map(String::from) - .collect(), - commands: vec![], - stem: None, - already_updated: Cell::new(false), - }, + reader.built_in_targets.extend( + builtin_targets() + .into_iter() + .map(|target| (target.name.clone(), target)), ); } reader -- cgit v1.2.3