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

Provide {to,from}_{ne,le,be}_bytes functions on integers #51919

Merged
merged 2 commits into from
Aug 4, 2018

Commits on Aug 3, 2018

  1. Provide {to,from}_{ne,le,be}_bytes functions on integers

    If one doesn't view integers as containers of bytes, converting them to
    bytes necessarily needs the specfication of encoding.
    
    I think Rust is a language that wants to be explicit. The `to_bytes`
    function is basically the opposite of that – it converts an integer into
    the native byte representation, but there's no mention (in the function
    name) of it being very much platform dependent. Therefore, I think it
    would be better to replace that method by three methods, the explicit
    `to_ne_bytes` ("native endian") which does the same thing and
    `to_{le,be}_bytes` which return the little- resp. big-endian encoding.
    tbu- committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    a04b2cd View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2018

  1. Change tracking issue from rust-lang#49792 to rust-lang#51919

    The old issue has already been in FCP, a new issue was opened for the
    new API.
    tbu- committed Aug 4, 2018
    Configuration menu
    Copy the full SHA
    0ddfae5 View commit details
    Browse the repository at this point in the history