Skip to content

Commit b5d4421

Browse files
authored
Merge pull request #1286 from IvanUkhov/custom-build
Process build scripts
2 parents 72a67f4 + 56e0c46 commit b5d4421

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bin/cargo-fmt.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,15 @@ enum TargetKind {
119119
Example, // example file
120120
Test, // test file
121121
Bench, // bench file
122+
CustomBuild, // build script
122123
Other, // plugin,...
123124
}
124125

125126
impl TargetKind {
126127
fn should_format(&self) -> bool {
127128
match *self {
128129
TargetKind::Lib | TargetKind::Bin | TargetKind::Example | TargetKind::Test |
129-
TargetKind::Bench => true,
130+
TargetKind::Bench | TargetKind::CustomBuild => true,
130131
_ => false,
131132
}
132133
}
@@ -169,6 +170,7 @@ fn target_from_json(jtarget: &Json) -> Target {
169170
"test" => TargetKind::Test,
170171
"example" => TargetKind::Example,
171172
"bench" => TargetKind::Bench,
173+
"custom-build" => TargetKind::CustomBuild,
172174
_ => TargetKind::Other,
173175
};
174176

0 commit comments

Comments
 (0)