]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #34268 - zackmdavis:if_let_over_none_unit_arm, r=jseyfried
authorManish Goregaokar <manishsmail@gmail.com>
Wed, 15 Jun 2016 21:59:20 +0000 (22:59 +0100)
committerManish Goregaokar <manishsmail@gmail.com>
Thu, 16 Jun 2016 00:39:44 +0000 (01:39 +0100)
prefer `if let` to match with `None => ()` arm in some places

Casual grepping revealed some places in the codebase (some of which
antedated `if let`'s December 2014 stabilization in c200ae5a) where we
were using a match with a `None => ()` arm where (in the present
author's opinion) an `if let` conditional would be more readable. (Other
places where matching to the unit value did seem to better express the
intent were left alone.)

It's likely that we don't care about making such trivial,
non-functional, sheerly æsthetic changes.

But if we do, this is a patch.


Trivial merge