# Allow using unstable features in stable rustfmt (if they have shipped).
unstable_features = true
# Fix up imports.
reorder_imports = true
group_imports = "StdExternalCrate"
imports_granularity = "Crate"
# Wrap comments too.
wrap_comments = true
# Wrap comments at the same place as code, default is 80.
# Refs: https://github.com/rust-lang/rustfmt/issues/3349#issuecomment-622522913
comment_width = 100
format_code_in_doc_comments = true
# Reorder mod declarations alphabetically in group.
reorder_modules = true
# Types before functions in trait impls.
reorder_impl_items = true
# Use `MyStruct {a, b, c}` where possible not `MyStruct {a: a, b: b, c: c}`.
use_field_init_shorthand = true
# Error on TODOs (use FIXME for long-running things).
# report_todo = "Always"