Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve concision #23

Merged
merged 3 commits into from
May 15, 2022
Merged

Commits on May 13, 2022

  1. Simplify the implementation of most_common_tiebreaker()

    Use match ergonomics to simplify the pattern matching.  When matching a
    reference value with a non-reference pattern, the default binding mode
    is automatically set to `ref`.  In this case, by removing the `&` on the
    tuples and the `ref` keywords on their fields, the variables
    `{a,b}_{item,count}` are bound as references.
    
    Replace the `match` expression with `Ordering::then_with()`, which does
    the same thing more succinctly.
    clint-white committed May 13, 2022
    Configuration menu
    Copy the full SHA
    0d15b43 View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary .into_iter() in for-loops

    We can directly loop over containers of type `I: IntoIter` without
    having to call `IntoIter::into_iter()` explicitly; that is part of the
    syntactic sugar of `for`-loops.
    clint-white committed May 13, 2022
    Configuration menu
    Copy the full SHA
    7392076 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    df480c5 View commit details
    Browse the repository at this point in the history