diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2020-10-30 13:42:07 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2020-10-30 13:42:07 -0700 |
commit | 9d961981db81d10a7315160fbcb45b1ebaf4c119 (patch) | |
tree | 8f34548cf5152a49ab90e0eb2ffee47392793f42 /rustfmt.toml | |
parent | 99a6971893b7d08c1d976e4eb99701e36d80afb8 (diff) |
Add and apply rustfmt configuration
Diffstat (limited to 'rustfmt.toml')
-rw-r--r-- | rustfmt.toml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..0acf7d0 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,33 @@ +# A lot of the styles we want can only be configured +# using unstable features. +# +# If you have trouble running rustfmt, try "cargo +nightly fmt". +unstable_features = true + +edition = "2018" +fn_args_layout = "Vertical" +format_code_in_doc_comments = true +imports_layout = "Vertical" +match_block_trailing_comma = true +max_width = 80 +merge_imports = true +normalize_comments = true +normalize_doc_attributes = true +overflow_delimited_expr = true +reorder_impl_items = true +struct_lit_single_line = false +use_field_init_shorthand = true +use_small_heuristics = "Off" +use_try_shorthand = true +wrap_comments = true + +# This one isn't released yet. +#fn_call_width = 40 + +# These are already set to the defaults, but they are things +# we really want to make sure are set, just in case defaults change. +reorder_imports = true +reorder_modules = true +space_after_colon = true +space_before_colon = false +tab_spaces = 4 |