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

digest internals: Refactor format_output. #2191

Merged
merged 1 commit into from
Dec 18, 2024
Merged

digest internals: Refactor format_output. #2191

merged 1 commit into from
Dec 18, 2024

Conversation

briansmith
Copy link
Owner

Avoid calling format_output through pointers. It turns out it's more efficient to just do things the straightforward way, as we don't save anything (code size, in particular) with the function pointer approach, as we would with the block_data_order. This further clarifies the static analysis of the panic-freeness of BlockContext::try_finish as we remove these two unreachable unreachable!() calls.

Avoid calling `format_output` through pointers. It turns out it's
more efficient to just do things the straightforward way, as we
don't save anything (code size, in particular) with the function
pointer approach, as we would with the `block_data_order`. This
further clarifies the static analysis of the panic-freeness of
`BlockContext::try_finish` as we remove these two unreachable
`unreachable!()` calls.
@briansmith briansmith self-assigned this Dec 18, 2024
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.92%. Comparing base (08832ab) to head (953c1d7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2191   +/-   ##
=======================================
  Coverage   96.91%   96.92%           
=======================================
  Files         154      154           
  Lines       20239    20234    -5     
  Branches      461      461           
=======================================
- Hits        19615    19611    -4     
+ Misses        520      518    -2     
- Partials      104      105    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@briansmith briansmith merged commit b4d1334 into main Dec 18, 2024
158 checks passed
@briansmith briansmith deleted the b/panic-less-2 branch December 18, 2024 23:30
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.

1 participant