]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #34638 - zackmdavis:if_let_over_none_empty_block_arm, r=jseyfried
authorbors <bors@rust-lang.org>
Mon, 4 Jul 2016 09:18:46 +0000 (02:18 -0700)
committerGitHub <noreply@github.com>
Mon, 4 Jul 2016 09:18:46 +0000 (02:18 -0700)
prefer `if let` to match with `None => {}` arm in some places

This is a spiritual succesor to #34268 / 8531d581, in which we replaced a
number of matches of None to the unit value with `if let` conditionals
where it was judged that this made for clearer/simpler code (as would be
recommended by Manishearth/rust-clippy's `single_match` lint). The same
rationale applies to matches of None to the empty block.

----

r? @jseyfried

1  2 
src/librustc_typeck/lib.rs

Simple merge