File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPathNew {
9696 // if a generic is used in multiple places, we should better not touch it,
9797 // since we'd need to suggest changing both parameters that using it at once,
9898 // which might not be possible
99- . filter ( |g| {
100- let inputs_and_output = sig. inputs ( ) . iter ( ) . copied ( ) . chain ( [ sig. output ( ) ] ) ;
101- inputs_and_output. filter ( |i| i. contains ( * g) ) . count ( ) < 2
102- } )
99+ . filter ( |g| sig. inputs_and_output . into_iter ( ) . filter ( |i| i. contains ( * g) ) . count ( ) < 2 )
103100 // don't want to mess with the output type, since that probably has some additional
104101 // restrictions imposed from the outside, which we don't want to bother checking
105102 . filter ( |g| !sig. output ( ) . contains ( * g) )
You can’t perform that action at this time.
0 commit comments