From 3d5f75d6c3e327e77770090dd077d98a49c9e188 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Mon, 11 May 2026 14:34:01 +0200 Subject: [PATCH] rustfmt.toml: Enable additional formatting options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable more settings, including some that are currently unstable. Prefer options that are also used by the Rust project itself [1]. [1] https://github.com/rust-lang/rust/blob/64a965e9013a9d14e83c4d370af26f6be6bf96fb/rustfmt.toml#L5-L6 Acked-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- .rustfmt.toml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.rustfmt.toml b/.rustfmt.toml index 753e9b7d..e2dc443b 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,13 +1,12 @@ edition = "2021" newline_style = "Unix" -# Unstable options that help catching some mistakes in formatting and that we may want to enable -# when they become stable. -# -# They are kept here since they are useful to run from time to time. -#comment_width = 100 -#format_code_in_doc_comments = true -#group_imports = "StdExternalCrate" -#normalize_comments = true +# Unstable options that help catching some mistakes in formatting +group_imports = "StdExternalCrate" +imports_granularity = "Module" +use_field_init_shorthand = true +comment_width = 100 +format_code_in_doc_comments = true +normalize_comments = true +wrap_comments = true #reorder_impl_items = true -#wrap_comments = true