You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this is not that big of a deal (we can use to_lowercase/uppercase), it can be an annoyance :).
Would it be possible to unify the case-ness of the output? If so, what case should be preferred? It would be great if this caseness could be controlled - maybe via {:X?} and {:x?}? Although I'm not sure whether it's even possible.
Would it be a breaking change?
The text was updated successfully, but these errors were encountered:
I think we'd probably want to implement the UpperHex (and related) traits. Then I believe you could use {:X?} with a &BStr. I think that's probably fine. It's not quite a perfect fit if you read the docs of UpperHex though, since it seems to imply that it's for formatting numbers and this is for strings.
Aside from that though, yes, absolutely, we can unify the case. That should be fixed regardless. It was probably just an oversight. I haven't noticed it because it looks like the uppercase variant is very rare. So to that end, I'd be happy to accept a PR that switches everything to lowercase.
wbenny
added a commit
to wbenny/bstr
that referenced
this issue
Jul 28, 2024
Hi,
I found a discrepancy in upper/lower case within debug formatting of BStr:
https://github.com/BurntSushi/bstr/blob/master/src/impls.rs#L483-L493
While this is not that big of a deal (we can use to_lowercase/uppercase), it can be an annoyance :).
Would it be possible to unify the case-ness of the output? If so, what case should be preferred? It would be great if this caseness could be controlled - maybe via {:X?} and {:x?}? Although I'm not sure whether it's even possible.
Would it be a breaking change?
The text was updated successfully, but these errors were encountered: