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 patch tries to improve the confusing situation with ID hex formatting:
Id::hex
implementation (also used inId::hex_path
) skipped inner zero bytes so that different numbers are mapped to the same hex string. We need to keep this behavior for compatibility. But to indicate this flaw and avoid usage in new code, this PR removesId::hex
and renamesId::hex_path
toId::legacy_hex_path
.Id::hex_path
is kept as a deprecated alias for easier migration.Id::hex_clean
function that correctly formats numbers with inner zero bytes. This PR also addsId::clean_hex_path
that can be used for paths in new code.Id::hex_clean
function skipped all zero bytes, including the trailing zero. As it is currently only used in theDebug
implementation, this PR changes it to format 0 as"00"
.heapless
dependency intrussed-core
. Not really important right now, but will be useful once we can upgradeheapless-bytes
.