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

Uniform (and not redundant) treatment of "0x" with to_hex() #998

Merged
merged 5 commits into from
Aug 15, 2023

Conversation

vector76
Copy link
Contributor

image

to_hex() produces strings beginning with "0x" and in almost all usage, it is preceded by "0x", producing double "0x0xA1B2C3D4".

To make coherent, "0x" is removed from the to_hex() function and added in the two places where it is not already present in the caller.

Copy link
Collaborator

@MitchBradley MitchBradley left a comment

Choose a reason for hiding this comment

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

I would have been tempted to do it the other way - remove the external 0x and leave it in to_hex

@vector76
Copy link
Contributor Author

That is actually my preference too, but I wasn't sure what was "intended". I'll update to be that way.

@MitchBradley MitchBradley changed the base branch from main to Devt August 15, 2023 16:30
@MitchBradley MitchBradley merged commit c9f94bf into bdring:Devt Aug 15, 2023
12 checks passed
@vector76 vector76 deleted the to_hex_redundant branch August 15, 2023 18:34
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.

3 participants