• G
    Rollup merge of #37241 - zackmdavis:if_let_over_none_spaced_empty_block_arm, r=nikomatsakis · 123a6ef2
    Guillaume Gomez 提交于
    prefer `if let` to match with `None => { }` arm in some places
    
    In #34268 (8531d581), we replaced matches of None to the unit value `()`
    with `if let`s in places where it was deemed that this made the code
    unambiguously clearer and more idiomatic. In #34638 (d37edef9), we did
    the same for matches of None to the empty block `{}`.
    
    A casual observer, upon seeing these commits fly by, might suppose that
    the matter was then settled, that no further pull requests on this
    utterly trivial point of style could or would be made. Unless ...
    
    It turns out that sometimes people write the empty block with a space in
    between the braces. Who knew?
    123a6ef2
pprust.rs 114.3 KB