Process build scripts

This commit is contained in:
Ivan Ukhov 2017-01-25 08:29:48 +01:00
parent 72a67f4523
commit 56e0c463d5

View file

@ -119,6 +119,7 @@ enum TargetKind {
Example, // example file
Test, // test file
Bench, // bench file
CustomBuild, // build script
Other, // plugin,...
}
@ -126,7 +127,7 @@ impl TargetKind {
fn should_format(&self) -> bool {
match *self {
TargetKind::Lib | TargetKind::Bin | TargetKind::Example | TargetKind::Test |
TargetKind::Bench => true,
TargetKind::Bench | TargetKind::CustomBuild => true,
_ => false,
}
}
@ -169,6 +170,7 @@ fn target_from_json(jtarget: &Json) -> Target {
"test" => TargetKind::Test,
"example" => TargetKind::Example,
"bench" => TargetKind::Bench,
"custom-build" => TargetKind::CustomBuild,
_ => TargetKind::Other,
};