Simplify Handler Registration API with Adapt, Func, and Must Functions#8
Merged
screwyprof merged 2 commits intomainfrom Mar 30, 2023
Merged
Simplify Handler Registration API with Adapt, Func, and Must Functions#8screwyprof merged 2 commits intomainfrom
screwyprof merged 2 commits intomainfrom
Conversation
f7ab2cc to
7bec3e4
Compare
screwyprof
added a commit
that referenced
this pull request
Mar 30, 2023
…#8 ## Description In this PR, we have refactored the handler registration API to make it more user-friendly and straightforward. We've introduced `Adapt`, `Func`, and `Must` helper functions to simplify the process and improve overall usability. By simplifying the handler registration API, developers will find it easier to work with the library, resulting in a more enjoyable and efficient development experience. ## Type of change Please delete options that are not relevant. - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Additional Context (optional) - Introduced `Adapt` function to convert between different runner types - Added `Func` function to make it easier to create runners from simple functions - Implemented `Must` helper function to streamline error handling during registration ## Checklist: - [x] I have performed a self-review of my own code - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings (`make lint`) - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes (`make test`)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In this PR, we have refactored the handler registration API to make it more user-friendly and straightforward. We've introduced
Adapt,Func, andMusthelper functions to simplify the process and improve overall usability. By simplifying the handler registration API, developers will find it easier to work with the library, resulting in a more enjoyable and efficient development experience.Type of change
Please delete options that are not relevant.
Additional Context (optional)
Adaptfunction to convert between different runner typesFuncfunction to make it easier to create runners from simple functionsMusthelper function to streamline error handling during registrationChecklist:
make lint)make test)