rust: str: add `b_str!` macro
Add the `b_str!` macro, which creates a new `BStr` from
a string literal.
It is usable in const contexts, for instance:
const X: &BStr = b_str!("Example");
Signed-off-by:
Gary Guo <gary@garyguo.net>
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
Loading
Please sign in to comment