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

Simplify the implementation of iterators over slices of ZSTs #111395

Merged
merged 1 commit into from
May 12, 2023

Commits on May 10, 2023

  1. Simplify the implementation of iterators over slices of ZSTs

    Currently, slice iterators over ZSTs store `end = start.wrapping_byte_add(len)`.
    
    That's slightly convenient for `is_empty`, but kinda annoying for pretty much everything else -- see bugs like 42789, for example.
    
    This PR instead changes it to just `end = ptr::invalid(len)` instead.
    
    That's easier to think about (IMHO, at least) as well as easier to represent.
    scottmcm committed May 10, 2023
    Configuration menu
    Copy the full SHA
    15aa7fa View commit details
    Browse the repository at this point in the history