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

common: fix a comment #21609

Closed
wants to merge 1 commit into from
Closed

Conversation

mrFranklin
Copy link
Contributor

this method is in use, not Deprecated.

@MariusVanDerWijden
Copy link
Member

Well the point of this comment is, that the method should not be in use

@holiman holiman closed this Sep 24, 2020
@mrFranklin
Copy link
Contributor Author

@MariusVanDerWijden @holiman
But the method can not be deleletd. It's in use.
Should we delete it?

@mrFranklin
Copy link
Contributor Author

mrFranklin commented Sep 24, 2020

the method is not the same as hexutil.Encode. so I think it's useful.
as it say:
For empty slices, the return value is "0x0".

hexutil.Encode can not.

@fjl
Copy link
Contributor

fjl commented Oct 14, 2020

I marked ToHex deprecated a long time ago when I tried to remove as much hex encoding/decoding as possible from package common. The replacement for these functions is/was package hexutil.

The 0x0 special case for []byte is very weird and I hope we are not using it anyhwere. The only thing that should encode to 0x0 is the integer zero.

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.

4 participants