bstr
bstr copied to clipboard
api: const fn BString::new
trafficstars
I'm using BString to implement an output capture struct and leverage the BString debug impl.
I'm currently adding const to as many zero argument new constructors in my code as I can. Since BString is a thin wrapper around Vec, I expected to have an analogous pub const fn new() method available.
There is no workaround for this since Into::into is not const.
I think this can probably happen in bstr 1.0. It is mostly a matter of MSRV. But I'm in favor of such things in principle. Although it seems more like a mild nicety at this point to me.