# Configuration for https://rust-lang.github.io/rustfmt/
edition = "2024"

# E.g. Foo { a, b, c }
use_field_init_shorthand = true

# Unstable options. These require a nightly compiler to use (cargo +nightly fmt).

# We choose a wider comment width, as this tends to make comments more readable than truncating at
# 80 characters.
wrap_comments = true
comment_width = 100
format_code_in_doc_comments = true

# `#[doc = "..."]` -> `/// ...`
normalize_doc_attributes = true

# We choose module granularity for imports as this tends to have the best balance between low
# linecount while making it simple to understand diffs
group_imports = "StdExternalCrate"
imports_granularity = "Module"

format_macro_matchers = true
