Skip to content

Commit dc02b5b

Browse files
committed
don't try to compile examples and tests
see rust-lang#503 (comment) for context
1 parent ce06f77 commit dc02b5b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/utils/cargo_metadata.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,9 @@ pub(crate) struct Package {
8080

8181
impl Package {
8282
fn library_target(&self) -> Option<&Target> {
83-
self.targets.iter().find(|target| {
84-
target
85-
.kind
86-
.iter()
87-
.any(|kind| kind != "bin")
88-
})
83+
self.targets
84+
.iter()
85+
.find(|target| target.crate_types.iter().any(|kind| kind != "bin"))
8986
}
9087

9188
pub(crate) fn is_library(&self) -> bool {
@@ -110,7 +107,7 @@ impl Package {
110107
#[derive(RustcDecodable)]
111108
pub(crate) struct Target {
112109
pub(crate) name: String,
113-
pub(crate) kind: Vec<String>,
110+
crate_types: Vec<String>,
114111
pub(crate) src_path: Option<String>,
115112
}
116113

0 commit comments

Comments
 (0)