style(core/rust): configure rustfmt for uniform grouping
What changed, and why it matters
This commit only changes Rust code formatting rules. It moves a rustfmt.toml configuration file up one directory and adjusts how Rust import statements are automatically grouped and sorted. There is no change to program logic, security behavior, or any executable code.
No security action needed. This is a code-style tooling change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit is a pure style/configuration change. It deletes core/embed/rust/rustfmt.toml and creates core/embed/rustfmt.toml with formatting directives: wrap_comments = true, imports_granularity = “Module”, reorder_imports = true, group_imports = “StdExternalCrate”. These settings only affect rustfmt’s output and do not alter compiled firmware behavior.
Changed components
core/embed/rust/rustfmt.tomlcore/embed/rustfmt.tomlInspect captured patch +4 / −2
diff --git a/core/embed/rust/rustfmt.toml b/core/embed/rust/rustfmt.toml
deleted file mode 100644
index c1d40dc8..00000000
--- a/core/embed/rust/rustfmt.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-wrap_comments = true
-imports_granularity = "Crate"
diff --git a/core/embed/rustfmt.toml b/core/embed/rustfmt.toml
new file mode 100644
index 00000000..c03ba4eb
--- /dev/null
+++ b/core/embed/rustfmt.toml
@@ -0,0 +1,4 @@
+wrap_comments = true
+imports_granularity = "Module"
+reorder_imports = true
+group_imports = "StdExternalCrate"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.