• N
    Simplify `cs_fold`. · 16a286b0
    Nicholas Nethercote 提交于
    `cs_fold` has four distinct cases, covered by three different function
    arguments:
    
    - first field
    - combine current field with previous results
    - no fields
    - non-matching enum variants
    
    This commit clarifies things by replacing the three function arguments
    with one that takes a new `CsFold` type with four slightly different)
    cases
    
    - single field
    - combine result for current field with results for previous fields
    - no fields
    - non-matching enum variants
    
    This makes the code shorter and clearer.
    16a286b0
partial_ord.rs 3.9 KB