forked from mux-labs/mux-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrustfmt.toml
More file actions
33 lines (26 loc) · 1.14 KB
/
Copy pathrustfmt.toml
File metadata and controls
33 lines (26 loc) · 1.14 KB
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
# rustfmt configuration for mux-contracts
#
# This file pins the formatting rules that `cargo fmt` and the CI fmt-check
# step enforce. Running `cargo fmt --all` locally will produce output that
# is identical to what the CI `cargo fmt --all -- --check` step expects.
#
# CI step (ci.yml):
# - name: cargo fmt
# run: cargo fmt --all -- --check
edition = "2021"
# Stable options only — nightly-only options are intentionally omitted so
# that the stable toolchain pinned in ci.yml can apply this config without
# requiring the nightly channel.
# Line width: default is 100; keep it at 100 to match the Rust style guide.
max_width = 100
# Trailing commas in function calls / definitions that span multiple lines.
trailing_comma = "Vertical"
# Import merging: group std / external / crate imports but do not reorder
# items within a group (avoids noisy diffs on import-only changes).
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
# Newline style: Unix line endings (LF) across all platforms.
newline_style = "Unix"
# Normalise string literals to use double quotes where possible.
use_field_init_shorthand = true
use_try_shorthand = true