Add optional strum to enums, update README, add more wrappers#2
Open
joe-saronic wants to merge 19 commits into
Open
Add optional strum to enums, update README, add more wrappers#2joe-saronic wants to merge 19 commits into
joe-saronic wants to merge 19 commits into
Conversation
213473e to
f232512
Compare
Owner
|
This looks great -- I'm going to do some additional testing, but let me know if you're ready for me to review or if this is still WIP. |
Contributor
Author
This is in active use on my end. I'm going to make more PRs as I go, but this one should be pretty stable. I appreciate the additional testing. |
Contributor
Author
|
I added one more commit bumping the syslib version since I had forgotten to do that, but aside from that everything still appears to be working. As an FYI, I currently have the following PR in the pipeline, which I will transfer over once the conditions are met: joe-saronic#1 |
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.
The original purpose of this PR was to add
strum::Display(and thereforeToString) support for enums in this crate. My particular usescase was that I wanted to dump the PPK fix status as a string rather than a number into an output file. Since then, it's grown to add more functionality:receiversfeature flag for all the receiver types known to rtklib (TODO: AdvancedNavigation)convrnxwrapper underconvfeature, which requiresreceiversA design note:
num_enumstays as-is since it's very lightweight and theTryFromPrimitiveconversion is much nicer IMO, than whatstrumwould offer withFromRepr.Tested this by using the new modules in our code. Everything seems to work nominally.