Skip to content

Commit 2e6bd89

Browse files
committed
Format Rust file generated by cynic
When unformatted, the file contains a single line with 3.4M characters. This makes running Clippy on this repository very slow because some lints manipulate the source code, for example to detect mistyped doc comment markers.
1 parent 33cb57e commit 2e6bd89

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

github-graphql/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@ pub fn main() {
44
.unwrap()
55
.as_default()
66
.unwrap();
7+
std::process::Command::new("rustfmt")
8+
.arg(format!(
9+
"{}/cynic-schemas/github.rs",
10+
std::env::var("OUT_DIR").unwrap()
11+
))
12+
.status()
13+
.expect("failed to execute rustfmt");
714
}

0 commit comments

Comments
 (0)