-
Notifications
You must be signed in to change notification settings - Fork 151
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
feature: bytes handles numeric arrays and bytearrays in deser #202
Conversation
Gave the same treatment to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll implement these rq
hex::decode(v) | ||
.map_err(|_| { | ||
de::Error::invalid_value(de::Unexpected::Str(v), &"a valid hex string") | ||
}) | ||
.map(From::from) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hex::decode(v) | |
.map_err(|_| { | |
de::Error::invalid_value(de::Unexpected::Str(v), &"a valid hex string") | |
}) | |
.map(From::from) | |
v.parse() | |
.map_err(|_| { | |
de::Error::invalid_value(de::Unexpected::Str(v), &"a valid hex string") | |
}) |
crates/primitives/src/bytes/serde.rs
Outdated
where | ||
A: serde::de::SeqAccess<'de>, | ||
{ | ||
let mut bytes = Vec::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closes #198
Motivation
Solution
PR Checklist