32 lines
923 B
TOML
32 lines
923 B
TOML
|
|
# 最大行宽,超过此宽度将换行
|
|||
|
|
max_width = 160
|
|||
|
|
# 是否使用硬制表符,false表示使用空格
|
|||
|
|
hard_tabs = false
|
|||
|
|
# 制表符的空格数
|
|||
|
|
tab_spaces = 4
|
|||
|
|
# 换行符风格,"Auto"表示自动检测
|
|||
|
|
newline_style = "Auto"
|
|||
|
|
# 启发式换行策略,"Default"表示使用默认策略
|
|||
|
|
use_small_heuristics = "Default"
|
|||
|
|
# 是否重新排序导入语句
|
|||
|
|
reorder_imports = true
|
|||
|
|
# 是否重新排序模块
|
|||
|
|
reorder_modules = true
|
|||
|
|
# 是否删除嵌套括号
|
|||
|
|
remove_nested_parens = true
|
|||
|
|
# Rust版本,影响格式化规则
|
|||
|
|
edition = "2024"
|
|||
|
|
# 是否合并派生宏
|
|||
|
|
merge_derives = true
|
|||
|
|
# 是否将 Result<T, E> 转换为 ? 操作符
|
|||
|
|
use_try_shorthand = true
|
|||
|
|
# 是否使用字段初始化简写
|
|||
|
|
use_field_init_shorthand = false
|
|||
|
|
# 是否强制显式 ABI
|
|||
|
|
force_explicit_abi = true
|
|||
|
|
# 导入粒度,"Crate"表示按 crate 分组
|
|||
|
|
imports_granularity = "Crate"
|
|||
|
|
# 删除行尾的多余空格
|
|||
|
|
remove_trailing_whitespace = true
|
|||
|
|
|