Skip to content

Commit

Permalink
don't try to compile examples and tests
Browse files Browse the repository at this point in the history
see rust-lang#503 (comment)
for context
  • Loading branch information
jyn514 committed Dec 7, 2019
1 parent ce06f77 commit dc02b5b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/utils/cargo_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,9 @@ pub(crate) struct Package {

impl Package {
fn library_target(&self) -> Option<&Target> {
self.targets.iter().find(|target| {
target
.kind
.iter()
.any(|kind| kind != "bin")
})
self.targets
.iter()
.find(|target| target.crate_types.iter().any(|kind| kind != "bin"))
}

pub(crate) fn is_library(&self) -> bool {
Expand All @@ -110,7 +107,7 @@ impl Package {
#[derive(RustcDecodable)]
pub(crate) struct Target {
pub(crate) name: String,
pub(crate) kind: Vec<String>,
crate_types: Vec<String>,
pub(crate) src_path: Option<String>,
}

Expand Down

0 comments on commit dc02b5b

Please sign in to comment.