depotfmt should respect project config (e.g. rust edition)

#442
Opened by thk at 2025-04-26T17·24+00

My cls 13345, 13346 failed due to tools/depotfmt.nix failure. depotfmt hardcodes --edition=2021 for rustfmt. Thus all rust projects in depot are forced to have the same edition or at least the same rustfmt config. If a project has a cargo.toml it seems appropriate to me, to respect the edition defined there. And while we're at it, probably also respect a .rustfmt.toml file if present.