Skip to content

Refactor command compilation to use function pointers#108

Merged
cakebaker merged 2 commits intouutils:mainfrom
dspinellis:fp-compile-dispatch
Jul 25, 2025
Merged

Refactor command compilation to use function pointers#108
cakebaker merged 2 commits intouutils:mainfrom
dspinellis:fp-compile-dispatch

Conversation

@dspinellis
Copy link
Copy Markdown
Collaborator

This simplifies command handling by

  • replacing the construction and a runtime map lookup with a simple match structure,
  • eliminating an extra match lookup on the command argument type,
  • eliminating one field in each command specification, and
  • making command processing similar for each command.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 164 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (2430672) to head (3fbceac).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/uu/sed/src/compiler.rs 0.00% 164 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #108   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         13      13           
  Lines       2716    2664   -52     
  Branches     224     225    +1     
=====================================
+ Misses      2716    2664   -52     
Flag Coverage Δ
macos_latest 0.00% <0.00%> (ø)
ubuntu_latest 0.00% <0.00%> (ø)
windows_latest 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cakebaker cakebaker merged commit fdd5c42 into uutils:main Jul 25, 2025
15 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Nice refactoring, thanks!

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.

2 participants