move
move copied to clipboard
[account-address] Make display and hex outputs consistent
Motivation
Now, all default outputs should be 0xCAPS
. Additionally, there is now a from_hex_fuzzy()
which handles both 0x
and non-0x
inputs for the time being.
This is built as follows:
-
from_hex
-> Only hex characters, exact length -
from_hex_literal
-> Only 0x with hex characters, with length extension -
from_hex_fuzzy
-> Match either condition -
short_str_lossless
-> With 0x, but drop leading 0s - Drop the
to_hex
andto_hex_literal
since we can now useDisplay
orDebug
using the proper formatter. Additionally to remove any confusion around it. All of are now consistent as upper case.
https://github.com/move-language/move/issues/53
@tnowacki lmk how this looks
Overall it looks fine to me! but I imagine there might be some changes if you have tests to fix (they are all red, not sure if related, looks like it might not be). Just ping me again when things are passing :)
@tnowacki it looks like there is a compilation issue in addition to the tests failing, though the compilation issue doesn't look like it's due to me
Does this fix https://github.com/diem/move/issues/141 ?
Does this fix diem/move#141 ?
It should at least make it easier to fix :P, unsure right now if it fixes it or not
Let's switch the calls in
manifest_parser
tofrom_hex_literal
. Requesting changes to make sure we get those tests back from the revert.Thanks for all of this! It should have been done long ago
Sorry, been very distracted on other things, I'll probably come back on a pass through this in a week or two.
@gregnazario, ping me when you want another review! (looks like you are still working through some changes)