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

Eliminate a handful of unwraps from the codebase #4622

Merged
merged 4 commits into from
May 21, 2024

Commits on May 21, 2024

  1. chore: Eliminate .unwraps() in seccompiler

    These unwraps were impossible to trigger due to preceding checks, but by
    using some patterns matching in the checks instead, we can eliminate
    them altogether.
    
    Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
    roypat committed May 21, 2024
    Configuration menu
    Copy the full SHA
    d18c9f0 View commit details
    Browse the repository at this point in the history
  2. chore: simplify *Metrics::alloc and avoid .unwrap()

    Reduce number of unwraps/lock operations needed by using the `.entry()`
    API for more idiomatic code.
    
    Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
    roypat committed May 21, 2024
    Configuration menu
    Copy the full SHA
    6ee1811 View commit details
    Browse the repository at this point in the history
  3. chore: Eliminate miscellaneous .unwraps()s

    Removes a handful of unwraps by slightly rearranging code (e.g. by using
    pattern matching to combine the fallible operation with the check that
    ensures it won't actually fail).
    
    Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
    roypat committed May 21, 2024
    Configuration menu
    Copy the full SHA
    5fef080 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    edcba5f View commit details
    Browse the repository at this point in the history