From 4bad0c95c599ae954e29a7748a25d20369a1fdb3 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sun, 25 Feb 2024 01:28:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0rustfmt.toml=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=8C=E8=AE=BE=E7=BD=AE=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ica-rs/rustfmt.toml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ica-rs/rustfmt.toml diff --git a/ica-rs/rustfmt.toml b/ica-rs/rustfmt.toml new file mode 100644 index 0000000..5e13fba --- /dev/null +++ b/ica-rs/rustfmt.toml @@ -0,0 +1,23 @@ +# cargo fmt config + +# 最大行长 +max_width = 120 +# 链式调用的最大长度 +chain_width = 100 +# 数组的最大长度 +array_width = 100 +# 函数参数的最大长度 +attr_fn_like_width = 100 +# 函数调用参数的最大长度 +fn_call_width = 80 +# 简单函数格式化为单行 +fn_single_line = true + +# 自动对齐最大长度 +enum_discrim_align_threshold = 5 +# 字段初始化使用简写 +use_field_init_shorthand = true +# 是否使用彩色输出 +color = "Always" + +edition = "2021"