summary refs log tree commit diff
path: root/.rustfmt.toml
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2018-09-14 01:25:14 +0000
committerchrome-bot <chrome-bot@chromium.org>2018-09-15 20:58:19 -0700
commit9fbac2cf59eb87bff7ab423076d63a6b89c91bd8 (patch)
tree7648c3de728042d585d333c1a2fc271ba297870e /.rustfmt.toml
parent5e8406549f78abfbaa05860458ddbfba06281606 (diff)
downloadcrosvm-9fbac2cf59eb87bff7ab423076d63a6b89c91bd8.tar
crosvm-9fbac2cf59eb87bff7ab423076d63a6b89c91bd8.tar.gz
crosvm-9fbac2cf59eb87bff7ab423076d63a6b89c91bd8.tar.bz2
crosvm-9fbac2cf59eb87bff7ab423076d63a6b89c91bd8.tar.lz
crosvm-9fbac2cf59eb87bff7ab423076d63a6b89c91bd8.tar.xz
crosvm-9fbac2cf59eb87bff7ab423076d63a6b89c91bd8.tar.zst
crosvm-9fbac2cf59eb87bff7ab423076d63a6b89c91bd8.zip
Add basic rustfmt config
Enable two optional features:
- Swapping try for '?'
- Shortening "name = name," to "name," in member initialization.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: I8e29eb01f10451cd2a549a699de07f651cc4af0f
Reviewed-on: https://chromium-review.googlesource.com/1226224
Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to '.rustfmt.toml')
-rw-r--r--.rustfmt.toml2
1 files changed, 2 insertions, 0 deletions
diff --git a/.rustfmt.toml b/.rustfmt.toml
new file mode 100644
index 0000000..a2db301
--- /dev/null
+++ b/.rustfmt.toml
@@ -0,0 +1,2 @@
+use_field_init_shorthand = true
+use_try_shorthand = true