1
Fork 0

Use c"lit" for CStrings without unwrap

This commit is contained in:
Kornel 2024-11-30 20:32:00 +00:00
parent 3bff51ea91
commit eadea7764e
No known key found for this signature in database
14 changed files with 38 additions and 50 deletions

View file

@ -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()
})
}