This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
This file contains 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 refactor introduced breaking changes, so bumped up version to
0.4.0-beta.0
.Breaking changes
PrincipalInner
Principal
directly holdslen
andbytes
fieldsPrincipalError
enum has different set of variants reflecting changes infrom_text
logic.from_text
accepts input containing uppercase letters which results in Err before.from_text
verifies CRC32 check sequenceImplementation details
Principal::from_slice
as deprecatedtry_from_slice
data-encoding
instead ofbase32
base32
wrongly accepts invalid base32 string which makes error handling infrom_text
not cleardata-encoding
is better maintained and has more dependents and downloadsserde_test
serde_json
andserde_cbor
are kept indev-dependencies
because of doc-testsimpl::impl!
macro to verify the necessary traits are implementedDiscussion about data layout
After removing the layer of
PrincipalInner
, it becomes:I'm not sure whether we should keep the
repr(packed)
here. The Rust Nomicon says:https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=8b19c6d46a7600f575cc936c9dd746ca
With or without
repr(packed)
, the type always has size of 30.