☰
Debian Codegraph
@
0.2.12-1
/
/
tests
/
pass
/
byte_str_lit.rs
☽
☼
tests/pass/byte_str_lit.rs
code
plain
raw
symbols
SCIP
MIT
2018-2024 Xidorn Quan <
[email protected]
>
debian/copyright
1
use
cstr::cstr;
2
use
std::ffi::
CStr
;
3
4
fn
main
() {
5
let
foo: &'static
CStr
=
cstr
!
(
b"foo
\xff
bar"
);
6
assert_eq
!
(foo,
CStr
::from_bytes_with_nul(
b"foo
\xff
bar
\0
"
).unwrap());
7
}