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

Use unchecked mul to compute slice sizes #98078

Merged
merged 1 commit into from
Jun 15, 2022

Commits on Jun 14, 2022

  1. use unchecked mul to compute slice sizes

    ...since slice sizes can't signed wrap
    
    see https://doc.rust-lang.org/std/slice/fn.from_raw_parts.html
    
    > The total size len * mem::size_of::<T>() of the slice must be no larger than isize::MAX.
    erikdesjardins committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    50f6a9e View commit details
    Browse the repository at this point in the history