roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

Feature request: detect and suggest discards in tuple deconstruction

Open IanKemp opened this issue 6 years ago • 0 comments
trafficstars

Code along these lines:

var (foo, bar, quux) = MethodThatReturnsATwoTuple();

foo.DoSomething();
// bar is never used and could be discarded
quux.AnotherThing();

could be rewritten as:

var (foo, _, quux) = MethodThatReturnsATwoTuple();

foo.DoSomething();
quux.AnotherThing();

IanKemp avatar Aug 12 '19 11:08 IanKemp