You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: util.rs
    path of file: ./repos/espanso/espanso-modulo/src/sys
    
    the code of the file until where you have to start completion: /*
 * This file is part of espanso.
 *
 * Copyright (C) 2019-2021 Federico Terzi
 *
 * espanso is free softwar
    
pub fn convert_to_cstring_or_null(str: Option<String>) -> (Option<CString>, *const c_char) {
  let c_string =
    str.map(|str| CString::new(str).expect("unable to convert Option<String> to CString"));
  let c_ptr = c_string
    .as_ref()
    .map_or(std::ptr::null(), |path| path.as_ptr());

  (c_string, c_ptr)
}