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

Add new_range_api for RFC 3550 #125751

Merged
merged 1 commit into from
Jul 6, 2024
Merged

Add new_range_api for RFC 3550 #125751

merged 1 commit into from
Jul 6, 2024

Commits on Jul 5, 2024

  1. add new_range_api for RFC 3550

    This includes a `From<legacy::RangeInclusive> for RangeInclusive` impl for convenience, instead of the `TryFrom` impl from the RFC.
    Having `From` is highly convenient and the assertion is unlikely to be a problem in practice.
    
    This includes re-exports of all existing `Range` types under `core::range`, plus the range-related traits (`RangeBounds`, `Step`, `OneSidedRange`) and the `Bound` enum.
    
    Currently the iterators are just wrappers around the old range types,
    and most other trait impls delegate to the old rage types as well.
    
    Also includes an `.iter()` shorthand for `.clone().into_iter()`
    pitaj committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    ffea65b View commit details
    Browse the repository at this point in the history