diff options
author | Aleksey Kladov <[email protected]> | 2020-12-23 10:16:24 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-12-23 10:16:24 +0000 |
commit | 3ced546033973a63cb2ef1644ca099740fdfb1c2 (patch) | |
tree | 7c38c6204afc8faa7f9b2ede6e6d5ffe73f8b80f /rustfmt.toml | |
parent | e1aca75974d917755c04e5040100dfb6ae92f2f9 (diff) |
Make code more understandable
Avoid mutation of snapshot's config -- that's spooky action at a
distance. Instead, copy it over to a local variable.
This points out a minor architecture problem, which we won't fix right
away.
Various `ide`-level config structs, like `AssistConfig`, are geared
towards one-shot use when calling a specific methods. On the other
hand, the large `Config` struct in `rust-analyzer` is a long-term
config store.
The fact that `Config` stores `AssistConfig` is accidental -- a better
design would probably be to just store `ConfigData` inside `Config`
and create various `Config`s on the fly out of it.
Diffstat (limited to 'rustfmt.toml')
0 files changed, 0 insertions, 0 deletions