mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-02 02:11:06 +00:00
Merge pull request #1461 from alexcrichton/rustfmt-web-sys
Format web-sys bindings by default
This commit is contained in:
commit
18746ecf4a
@ -113,13 +113,13 @@ fn try_main() -> Result<(), failure::Error> {
|
|||||||
|
|
||||||
// run rustfmt on the generated file - really handy for debugging
|
// run rustfmt on the generated file - really handy for debugging
|
||||||
println!("cargo:rerun-if-env-changed=WEBIDL_RUSTFMT_BINDINGS");
|
println!("cargo:rerun-if-env-changed=WEBIDL_RUSTFMT_BINDINGS");
|
||||||
if env::var("WEBIDL_RUSTFMT_BINDINGS").is_ok() {
|
if env::var("WEBIDL_RUSTFMT_BINDINGS").ok() != Some("0".to_string()) {
|
||||||
let status = Command::new("rustfmt")
|
let status = Command::new("rustfmt")
|
||||||
.arg(&out_file_path)
|
.arg(&out_file_path)
|
||||||
.status()
|
.status()
|
||||||
.context("running rustfmt")?;
|
.context("running rustfmt")?;
|
||||||
if !status.success() {
|
if !status.success() {
|
||||||
bail!("rustfmt failed: {}", status)
|
println!("cargo:warning=rustfmt failed: {}", status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user