Solve the Conflicting implementation of the From<ed25519_dalek::ed25519::Error> for PasetoError
#49
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 error happens when the
v3_public
features is enable in combination with all or any of these other features:v1_public
v2_public
v3_public
**Why is this happening? **
i could not get to the exact cause of this error but this solves the error.
when the above 3 features are enabled, they also enable the
ed25519_dalek
feature crate. and thev3_public
feature enables thep384
feature crate. When the Error macro of thiserror derive theFrom<p384::ecdsa::Error> for PasetoError
it also seems to create an implementation ofFrom<ed25519_dalek::ed25519::Error> for PasetoError
. This also happens when I did manual implementation of both traits. I could not figure the root cause for this behavior. and the from macro on theRsaCipher
error variant also results in an implementation of this trait which results in a conflict. So i have manually implemented theFrom<ed25519_dalek::ed25519::Error> for PasetoError
under a feature that only allows it's compilation when theed25519_dalek
is enabled andp384
feature is disabled, and this solves the error and all the 81 tests are passing when all the features are enabled as expected.