rust: Enable formatting enforcement for Rust
libbinder was written before PREUPLOAD hooks worked properly. Enable
preupload hooks and reformat libbinder in Android Rust style.
Bug: 204089163
Test: Modify .rs file against style, attempt upload
Change-Id: I2204b66b533b823bc233011330f5cb65c79fd5d6
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 7ef26bf..f708acb 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -1,8 +1,10 @@
[Builtin Hooks]
+rustfmt = true
bpfmt = true
clang_format = true
[Builtin Hooks Options]
+rustfmt = --config-path=rustfmt.toml
# Only turn on clang-format check for the following subfolders.
clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
cmds/idlcli/