mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
b56e020077
Main one: instead of adding a parameter to function to handle special case, make the caller handle it. Second main one: make sure that function does a reasonable thing. `highlight_def` picks a color for def, *regardless* of the context the def is use. Feeding an info from the call-site muddies the responsibilities here. Minor smells, flagging the function as having space for improvement in the first place: * many parameters, some of which are set as constants on most call-sites (introduce severalfunction instad) * boolean param (add two functions instead) |
||
---|---|---|
.. | ||
src | ||
test_data | ||
Cargo.toml |