Skip to content

Commit

Permalink
Process build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanUkhov committed Jan 25, 2017
1 parent 72a67f4 commit 56e0c46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bin/cargo-fmt.rs
Expand Up @@ -119,14 +119,15 @@ enum TargetKind {
Example, // example file
Test, // test file
Bench, // bench file
CustomBuild, // build script
Other, // plugin,...
}

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,
}
}
Expand Down Expand Up @@ -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,
};

Expand Down

0 comments on commit 56e0c46

Please sign in to comment.