From 6d7269a675371bb8ccebab9ef9e72b3a1f341771 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 17 Aug 2016 17:04:21 +0200 Subject: [PATCH] also run clippy on examples --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index e5043c927..d476aa843 100644 --- a/src/main.rs +++ b/src/main.rs @@ -143,13 +143,20 @@ pub fn main() { let args = std::env::args().skip(2); if let Some(first) = target.kind.get(0) { if target.kind.len() > 1 || first.ends_with("lib") { + println!("compiling library"); if let Err(code) = process(std::iter::once("--lib".to_owned()).chain(args), &dep_path, &sys_root) { std::process::exit(code); } } else if first == "bin" { + println!("compiling bin target `{}`", target.name); if let Err(code) = process(vec!["--bin".to_owned(), target.name].into_iter().chain(args), &dep_path, &sys_root) { std::process::exit(code); } + } else if first == "example" { + println!("compiling example target `{}`", target.name); + if let Err(code) = process(vec!["--example".to_owned(), target.name].into_iter().chain(args), &dep_path, &sys_root) { + std::process::exit(code); + } } } else { panic!("badly formatted cargo metadata: target::kind is an empty array");