1 // Copyright © 2017 Mozilla Foundation
3 // This program is made available under an ISC-style license. See the
4 // accompanying file LICENSE for details.
7 use std::os::raw::c_char;
9 pub unsafe fn opt_bytes<'a>(c: *const c_char) -> Option<&'a [u8]> {
13 Some(CStr::from_ptr(c).to_bytes())