Use c"lit" for CStrings without unwrap
This commit is contained in:
parent
3bff51ea91
commit
eadea7764e
14 changed files with 38 additions and 50 deletions
|
@ -393,7 +393,7 @@ impl Command {
|
|||
fn os2c(s: &OsStr, saw_nul: &mut bool) -> CString {
|
||||
CString::new(s.as_bytes()).unwrap_or_else(|_e| {
|
||||
*saw_nul = true;
|
||||
CString::new("<string-with-nul>").unwrap()
|
||||
c"<string-with-nul>".to_owned()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue