Introducing "byte strings" to Rust: a string type that is not required to be valid UTF-8.https://github.com/BurntSushi/bstr
-
-
Replying to @burntsushi5
hmm could use a "why not [u8] / Vec<u8>" FAQ IMO since I kept saying we should add more useful APIs to slices, instead of special types, for a while now
2 replies 0 retweets 10 likes -
Replying to @eddyb_r
Maybe some day, but we have to start somewhere. There's a fair bit of stuff in bstr that would probably not make it into std.
1 reply 0 retweets 0 likes -
Replying to @burntsushi5
hmm, is wrapping the types more ergonomic than providing extension traits? I guess you can't generalize one of the inherent methods slices already have...
1 reply 0 retweets 0 likes
Yes, if only for the `Debug` impl, which is super convenient. (std might be able to provide it via specialization on Vec<u8> though.) Extension traits might be workable, but I do feel like a distinct type is easier to deal with in the ecosystem. Specialization could change that.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.