# Allow using unstable features in stable rustfmt (if they have shipped).
= true
# Fix up imports.
= true
# Keep all imports in one big list.
# Chosen because I keep them folded, and this makes them less visible.
= "One"
# One import line per thing being imported.
# Chosen because it keeps refactoring easy.
= "Item"
# Wrap comments too.
= true
# Wrap comments at the same place as code, default is 80.
# Refs: https://github.com/rust-lang/rustfmt/issues/3349#issuecomment-622522913
= 100
= true
# Reorder mod declarations alphabetically in group.
= true
# Types before functions in trait impls.
= true
# Use `MyStruct {a, b, c}` where possible not `MyStruct {a: a, b: b, c: c}`.
= true
# Try to format long strings.
# https://github.com/rust-lang/rustfmt/issues/3863
= true
# Error if the line was still too long after we formatted.
= true
# Error if rustfmt failed to format something.
# Can be run with `cargo +nightly fmt -- --config error_on_unformatted=true`
# error_on_unformatted = true
# Error on TODOs (use FIXME for long-running things).
# report_todo = "Always"