Use c"lit" for CStrings without unwrap
This commit is contained in:
@@ -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()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user