Formats every Rust file in the repository once, and keeps it that way.
- rustfmt.toml:
max_width = 140,use_small_heuristics = "Max". Of the stable settings tried, this one changed the fewest lines: about 46k changed lines, against about 163k at rustfmt's defaults (100 columns: 133k added, 30k removed), 116k at 120 columns and 86k at 140 columns with default heuristics. - 8a750bc is formatting only:
cargo fmt --allpluscargo fmtinapps/desktop/src-tauri, 560 files.cargo check --all-targetspasses for the workspace and the desktop app afterwards. The commit is listed in.git-blame-ignore-revs. Merge it with a merge commit, not a rebase, so the hash stays the same. - CI: a new
rustfmtjob in ci.yml runscargo fmt --checkover the workspace and the desktop app. Nothing compiles, so it takes a few seconds. Like the desktop job, it runs only when a change touches a.rsfile, rustfmt.toml, the toolchain or the workflow (ci-affected.mjs --job rustfmt, with a test). - CONTRIBUTING.md: run
cargo fmtbefore pushing Rust. After a rebase conflict with the reformat, take your side and runcargo fmtagain.
Open branches that touch Rust will conflict with this change. Most conflicts go away after a merge of main and cargo fmt.
Closes #353