Skip to content

ref: Switch Hubs using a Guard#524

Merged
Swatinem merged 2 commits into
masterfrom
ref/hub-guard
Nov 28, 2022
Merged

ref: Switch Hubs using a Guard#524
Swatinem merged 2 commits into
masterfrom
ref/hub-guard

Conversation

@Swatinem

@Swatinem Swatinem commented Nov 24, 2022

Copy link
Copy Markdown
Contributor

Use a SwitchGuard internally as a replacement for Hub::run which does
not require passing a closure, and does not go through panic::catch_unwind,
as Drop impls are guaranteed to be executed even when panics are unwinding.

fixes #522

@codecov-commenter

codecov-commenter commented Nov 24, 2022

Copy link
Copy Markdown

Codecov Report

Merging #524 (88a30a7) into master (00da3fc) will decrease coverage by 0.07%.
The diff coverage is 78.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #524      +/-   ##
==========================================
- Coverage   78.78%   78.70%   -0.08%     
==========================================
  Files          76       77       +1     
  Lines        9266     9279      +13     
==========================================
+ Hits         7300     7303       +3     
- Misses       1966     1976      +10     

Use a SwitchGuard internally as a replacement for `Hub::run` which does
not require passing a closure, and does not go through `panic::catch_unwind`,
as `Drop` impls are guaranteed to be executed even when panics are unwinding.
@Swatinem Swatinem marked this pull request as ready for review November 28, 2022 11:24
@Swatinem Swatinem merged commit b5a7d8e into master Nov 28, 2022
@Swatinem Swatinem deleted the ref/hub-guard branch November 28, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Hub::run/SentryFuture abstraction using scope guard

3 participants