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

Make all methods of std::net::Ipv4Addr const #76142

Merged
merged 4 commits into from
Sep 3, 2020
Merged

Commits on Aug 31, 2020

  1. Make more Ipv4Addr methods const

    Constify the following methods of `std::net::Ipv4Addr`:
     - `octets`
     - `is_loopback`
     - `is_private`
     - `is_link_local`
     - `is_shared`
     - `is_ietf_protocol_assignment`
     - `is_benchmarking`
     - `is_multicast`
     - `is_documentation`
    
    Also insta-stabilizes these methods as const.
    
    Possible because of the stabilization of const integer arithmetic and control flow.
    CDirkx committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    fbb3673 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2020

  1. Make methods unstable const under const_ipv4

    CDirkx committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    ee9e48b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fb64e6d View commit details
    Browse the repository at this point in the history
  3. Make all remaining methods of std::net::Ipv4Addr const

    Makes the following methods of `std::net::Ipv4Addr` unstable const under the `const_ipv4` feature:
     - `is_global`
     - `is_reserved`
     - `is_broadcast`
     - `to_ipv6_compatible`
     - `to_ipv6_mapped`
    
    This results in all methods of `Ipv4Addr` being const.
    
    Also adds tests for these methods in a const context.
    CDirkx committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    0c77257 View commit details
    Browse the repository at this point in the history