1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Rustfmt configuration for zai-rs
#
# Only stable options are used here so that `cargo fmt` on the stable
# toolchain (what CI runs) actually enforces every rule below. Earlier the
# config relied on nightly-only options (imports_granularity, group_imports,
# wrap_comments, normalize_comments, format_code_in_doc_comments,
# normalize_doc_attributes, control_brace_style, trailing_comma,
# struct_lit_single_line, struct_variant_width, match_arm_blocks,
# blank_lines_*, spaces_around_ranges) that stable rustfmt silently ignores,
# which made the CI formatting check a near no-op. (`force_explicit_abi` was
# also dropped — it is not a recognized rustfmt config key.)
= "2024"
# Maximum line width.
= 100
# Indentation: spaces, 4 wide.
= false
= 4
# Unix line endings.
= "Unix"
# Shorthand: `Foo { x }` instead of `Foo { x: x }`.
= true
# `?` shorthand instead of `try!(…)`.
= true
# Canonical derive ordering and import/module reordering.
= true
= true
= true
# Drop redundant nested parens: `(x)` -> `x`.
= true
# Width heuristics drive where rustfmt breaks collections/calls.
= "Default"
# Trailing comma inside `match` arms.
= true