aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-05 12:53:39 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-05 12:53:39 -0600
commit2f31215c0b4d7f8dbec94747a4f134d8eee70c44 (patch)
tree3c87bebd15287d559053173942b35b188c3ed49e /src/main.rs
parent0539e82bab014b24b956752cc4301b1cba8edc0f (diff)
downloadmakers-2f31215c0b4d7f8dbec94747a4f134d8eee70c44.tar.gz
makers-2f31215c0b4d7f8dbec94747a4f134d8eee70c44.zip
don't use &String where it makes a mess
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 58d3cba..3d4b19d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -74,13 +74,13 @@ fn main() -> Result<()> {
println!("{}", &makefile);
} else {
let targets = if args.targets().count() == 0 {
- let first_target = makefile.first_non_special_target.clone();
+ let first_target = makefile.first_non_special_target.as_deref();
match first_target {
Some(x) => vec![x],
None => bail!("no targets given on command line or found in makefile."),
}
} else {
- args.targets().cloned().collect()
+ args.targets().collect()
};
for target in targets {