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.
This PR uses marker structs to set the color order. This should save one match statement as the Color order is determined at compile time (which can be assumed as the Led ordering should not change during runtime).
Usage now would be:
The rest of the API stays the same (except that there's no
set_color_order
method anymore).Furthermore I allowed myself to also implement the preliminary async smart-leds-trait from here: smart-leds-rs/smart-leds-trait#13
Let me know what you think!
Note: the Cargo.toml still references my fork of the
smart-leds-trait
. Let's hope the async trait will be added in the next version, so that we can reference it properly.Closes #3