Formatting Rust: group and sort imports

⚓ Rust    📅 2025-08-15    👤 surdeus    👁️ 11      

surdeus

Warning

This post was published 109 days ago. The information described in this article may have changed.

I'd like to have some rustfmt options that are unstable.

Do we have alternatives to achieve it without nightly? Using the nightly toolchain just for rustfmt seems somewhat inconvenient to me, but maybe that's what some do.

reorder_imports = true
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
reorder_modules = true

2 posts - 2 participants

Read full topic

🏷️ Rust_feed