mirror of
https://github.com/openharmony/third_party_rust_rustix.git
synced 2026-07-19 23:03:36 -04:00
3da762c0c6
* Export a `zstr!` macro for `ZStr` literals. Export rustix's `zstr!` macro for creating `ZStr` literals, which can make passing string literals into rustix APIs more efficient. While here, improve the safety of the `zstr!` macro -- implement a NUL check in a way that can be optimized away in the common case, so that the check can be always enabled, preventing any possibility of UB.