Skip to content

Conversation

@egormanga
Copy link
Contributor

Description of Changes

For consistency with the PG Wire output format for BYTEA.

Before,

SELECT * FROM user WHERE id = '\xc200a1589a788b44c6269819cba4b3493db01ade34652acf33476662fdfc0cfb';

gave:

The literal expression `\xc200a1589a788b44c6269819cba4b3493db01ade34652acf33476662fdfc0cfb` cannot be parsed as type `(__identity__: U256)`

API and ABI breaking changes

None.

Expected complexity level and risk

1:

Trivial change.

Testing

  • Manual testing

) -> Result<R, hex::FromHexError> {
let hex = hex.as_ref();
let hex = if hex.starts_with(b"0x") {
let hex = if hex.starts_with(b"0x") || hex.starts_with(b"\\x") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check needs to be in its own branch to account for enclosing delimiters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are those? The escaped literal goes: \xAABBCCDD, with no tail.

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

Successfully merging this pull request may close these issues.

2 participants