-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathrustfmt.toml
More file actions
89 lines (65 loc) · 1.83 KB
/
rustfmt.toml
File metadata and controls
89 lines (65 loc) · 1.83 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Rust Code Formatting Configuration
# This file configures rustfmt for consistent code formatting across the TeachLink contract project
# Edition to use for formatting
edition = "2021"
# Column limit for code lines
max_width = 100
# Use small heuristics for indentation
hard_tabs = false
tab_spaces = 4
# Normalize formatting for doc comments
normalize_doc_attributes = true
# Imports formatting
imports_granularity = "Crate"
reorder_imports = true
reorder_modules = true
# Function formatting
fn_single_line = false
where_single_line = false
# Struct and enum formatting
struct_literal_style = "Default"
enum_discrim_align_threshold = 20
# Match statement formatting
match_arm_leading_pipes = "Never"
match_block_trailing_comma = false
# Formatting for closures
closure_indent = "Block"
# Arrow style for match arms
match_arm_blocks = true
# Force multiline formatting rules
force_explicit_abi = true
force_multiline_blocks = false
# Comments formatting
comment_width = 80
normalize_comments = true
wrap_comments = true
# Chains formatting
chain_width = 60
# String formatting
format_strings = true
# Stability features
unstable_features = true
# Spaces around binops
spaces_around_ranges = false
# Newline formatting
newline_style = "Unix"
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0
# Remove nested parentheses when possible
remove_nested_parens = true
# Space after colon in type annotations
space_after_colon = true
space_before_colon = false
# Trailing comma in tuples, arrays, and function arguments
trailing_comma = "Vertical"
# Use field init shorthand
use_field_init_shorthand = true
use_try_shorthand = true
# Fn args density
fn_args_layout = "Tall"
# Module resolution
use_small_heuristics = "Default"
# Other formatting options
format_code_in_doc_comments = true
format_macro_bodies = true
format_macro_matchers = true