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

Remove Option from TokenStream #65261

Merged
merged 3 commits into from
Oct 15, 2019

Commits on Oct 13, 2019

  1. Remove the Option in TokenStream.

    It means an allocation is required to create an empty `TokenStream`, but
    all other operations are simpler and marginally faster due to not having
    to check for `None`. Overall it simplifies the code for a negligible
    performance effect.
    
    The commit also removes `TokenStream::empty` by implementing `Default`,
    which is now possible.
    nnethercote committed Oct 13, 2019
    Configuration menu
    Copy the full SHA
    5c93492 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1ce0347 View commit details
    Browse the repository at this point in the history
  3. Lazify some mac_placeholder() calls.

    This avoids some unnecessary creation of empty token streams.
    nnethercote committed Oct 13, 2019
    Configuration menu
    Copy the full SHA
    18b48bf View commit details
    Browse the repository at this point in the history