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
When trying to use bstr in my own project, I noticed that slicing a BString yields a &[u8], while slicing a BStr yields a &BStr (which is what I'd expect).
Upon closer inspection, it looks like the Index trait is implemented for BStr, but not for BString, which is not what I'd expect. I'm not sure if this was a deliberate design decision or just an oversight, so I just wanted to bring this to your attention.
The text was updated successfully, but these errors were encountered:
Yup. This looks like an oversight. Slicing a BString I guess should probably yield a BStr. This can't be fixed without a breaking change, which I don't plan on releasing any time soon, if ever.
You can probably work around this by derefing a BString to BStr and then slicing.
When trying to use bstr in my own project, I noticed that slicing a BString yields a &[u8], while slicing a BStr yields a &BStr (which is what I'd expect).
Upon closer inspection, it looks like the Index trait is implemented for BStr, but not for BString, which is not what I'd expect. I'm not sure if this was a deliberate design decision or just an oversight, so I just wanted to bring this to your attention.
The text was updated successfully, but these errors were encountered: