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

Reduce the genericity of many closures #673

Merged
merged 6 commits into from
Aug 15, 2019

Commits on Aug 14, 2019

  1. Reduce the genericity of WhileSomeFolder::consume_iter's closure

    The `take_while` closure only needs to be generic in `T`, along with a
    captured `&AtomicBool`. When we write the closure directly, it carries
    all the type baggage of `WhileSomeFolder<'f, C>::consumer_iter<I>`,
    where the monomorphized type may explode. Instead, we can move this
    closure to a standalone function for reduced genericity.
    cuviper committed Aug 14, 2019
    Configuration menu
    Copy the full SHA
    224287b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d2c1424 View commit details
    Browse the repository at this point in the history
  3. Reduce the genericity of extend closures

    Most of these closures only need to be generic in the item type, but
    when created in the context of some `I` generic iterator, they inherit
    that genericity. This affects both type length and code duplication.
    cuviper committed Aug 14, 2019
    Configuration menu
    Copy the full SHA
    249fbb9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ba41dab View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    97cc314 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dbc114f View commit details
    Browse the repository at this point in the history