Closed Iaiao closed 2 years ago
This seems like a good addition. I'm not totally sure if the name parse_and_size
is the most idiomatic, but admittedly I can't think of anything better off the top of my head. One change I would like to see is switching the order of the tuple to be (NbtCompound, usize)
, since that's kind of implied by the function name: you get the thing you parsed first and then the size.
I'm not sure about the name too, but I couldn't find anything better
parse_and_size
returns the parsing result and a number of characters consumed. It can be useful when trying to find a leftover of a string (characters after ending}
)