forked from mirrors/gecko-dev
7 lines
176 B
Rust
7 lines
176 B
Rust
use cstr::cstr;
|
|
use std::ffi::CStr;
|
|
|
|
fn main() {
|
|
let foo: &'static CStr = cstr!(b"foo\xffbar");
|
|
assert_eq!(foo, CStr::from_bytes_with_nul(b"foo\xffbar\0").unwrap());
|
|
}
|