getsentry / sentry-rust

Official Sentry SDK for Rust
https://sentry.io/
Apache License 2.0
620 stars 153 forks source link

Micro-optimize Scope access #615

Closed Swatinem closed 1 year ago

Swatinem commented 1 year ago

Instead of having the compiler do bounds-checks and generate panic-ing code, just make that case impossible by making sure there is always a top scope.

codecov[bot] commented 1 year ago

Codecov Report

Merging #615 (7c038e3) into master (10c5640) will not change coverage. The diff coverage is 100.00%.

:exclamation: Current head 7c038e3 differs from pull request most recent head a7c32e2. Consider uploading reports for the commit a7c32e2 to get more accurate results

@@           Coverage Diff           @@
##           master     #615   +/-   ##
=======================================
  Coverage   73.14%   73.14%           
=======================================
  Files          57       57           
  Lines        6583     6583           
=======================================
  Hits         4815     4815           
  Misses       1768     1768