Open divergentdave opened 2 months ago
SGTM. For local development looks like it' reasonably possible to use a stable compiler while still using nightly rustfmt https://github.com/rust-lang/vscode-rust/issues/438.
wrap_comments
may also be useful.
We could automate and standardize a few more style choices if we used a nightly build of rustfmt, and set up a configuration file with the following options.
format_strings = true
(unstable): I made some one-off changes using this previously, to wrap very long string literals. At the time this un-stuck about half of the chains that couldn't be formatted. (the rest were due to long turbofishes)group_imports
(unstable): Our initial convention in this repository was to group all imports together, which maps to "One". Personally I would prefer "StdExternalCrate", which creates three groups of imports separated by blank lines in that order. This is closer to what rust-analyzer'sauto-import
assist does, though that creates up to five groups, splitting outself
andsuper
.imports_granularity = "Crate"
(unstable): Combines multiple import statements from the same crate into one.