From 68b8ad57e2fd31968dbe51e179707acd2e0c4d7b Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 22 Nov 2024 21:41:10 -0500 Subject: [PATCH] style: Allow rustfmt to organize imports Add `group_imports` and `import_granularity` to our rustfmt config. These values are the same as in rust-lang/rust. (backport ) (cherry picked from commit 0456dcb747b0b579119613b9e0ae7568bf499e83) --- rustfmt.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rustfmt.toml b/rustfmt.toml index 018747d94867a..de0fc5ecc0166 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,2 +1,4 @@ -error_on_line_overflow = true edition = "2021" +error_on_line_overflow = true +group_imports = "StdExternalCrate" +imports_granularity = "Module"