Issue 10/correcting compilation warnings #24
Merged
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.
Resolves #10.
The modular bitfield crate produces an unneccesary braces warning when
From
implementations are generated.
See: Remove the unnecessary braces around From implementations. Robbepop/modular-bitfield#66
A pull request ( Removes the unused braces warning in the autogenerated From implementations. Robbepop/modular-bitfield#68 ) to
resolve this was provided.
Since it is not yet accepted mainstream, the
modular-bitfield
dependency wastemporarily moved to a custom fork to move forward with the removal of
compilation warnings.
Previously,
Buildup
calculated the crc by digesting data as it was used.For this reason, it contained a crc field to keep track of it.
This was later changed to reduce the state that was kept during a
Buildup
,calculating it in place when the last frame of a transfer and its crc are met.
The previous code was only commented out and the field containing the crc was
kept, producing a dead code warning.
The
crc
field is now removed fromBuildup
, and the commented code thatreferred to it was removed.
The
modular-bitfield
crate, by default, generates a series of getters andsetters method for each field.
When those are unused, a dead code warning is produced.
To avoid the warnings, appropriate
#[skip]
attributes for the field ofvarious structures were added.