style: Make the generated bindings really be formatted.

TOOLTOOL_DIR isn't passed down to the rust scripts it seems, per:

  https://treeherder.mozilla.org/#/jobs?repo=try&revision=46854db239166ab3a43d36c7a954debb56968eab
This commit is contained in:
Emilio Cobos Álvarez 2018-03-11 20:14:06 +01:00
parent 29e10d4f88
commit 4295bef063
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -207,7 +207,7 @@ mod bindings {
let mut builder = Builder::default()
.rust_target(RustTarget::Stable_1_0);
let rustfmt_path = env::var_os("MOZ_AUTOMATION").and_then(|_| {
env::var_os("TOOLTOOL_DIR")
env::var_os("TOOLTOOL_DIR").or_else(|| env::var_os("MOZ_SRC"))
}).map(PathBuf::from);
builder = match rustfmt_path {