Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inverted fields in hex::Error::InvalidLength #189

Open
RCasatta opened this issue Jan 4, 2024 · 1 comment
Open

inverted fields in hex::Error::InvalidLength #189

RCasatta opened this issue Jan 4, 2024 · 1 comment

Comments

@RCasatta
Copy link
Collaborator

RCasatta commented Jan 4, 2024

I am testing #188 in a downstream lib

/// Tried to parse fixed-length hash from a string with the wrong type (expected, got).

I think the expected, got comment is wrong and the values used in the Display implementation are inverted.

I say so by looking at the macro impl after in a downstream lib I have this test failing to parse "aaaa" as asset id with

  left: "bad hex string length 64 (expected 4)"
 right: "bad hex string length 4 (expected 64)"

(the test was working with add54c8)

@apoelstra
Copy link
Member

I think we can replace src/hex.rs entirely once #188 is merged. Or I can add a commit to 188 next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants