]> git.lizzy.rs Git - rust.git/commit
rustfmt: Parse options once instead of once per file argument (#944)
authorKamal Marhubi <kamal@marhubi.com>
Sat, 16 Apr 2016 20:34:15 +0000 (16:34 -0400)
committerMarcus Klaas de Vries <mail@marcusklaas.nl>
Sat, 16 Apr 2016 20:34:15 +0000 (22:34 +0200)
commit27c91ee35b6dd42bb20f1aef4216299ab19bdaff
tree6b91e2d2b2ec47f22860c1c7a8d9bd72b5b29a13
parent41e037da7ede08d648ca196cbbba12b450aa2c8b
rustfmt: Parse options once instead of once per file argument (#944)

`update_config()` was parsing the `write-mode` option once for each file
argument. This commit parses them once up front into a `CliOptions`
struct, which is then applied to the config before calling `run()`.
src/bin/rustfmt.rs