mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 13:56:30 +03:00
always use to_string_lossy() for converting c-strings to String
the function to_string() is removed; c-strings may always be badly formatted and this should never lead to a panic.
This commit is contained in:
@@ -42,7 +42,7 @@ pub fn get_ct_subtype(mime: *mut Mailmime) -> Option<String> {
|
||||
let ct: *mut mailmime_content = (*mime).mm_content_type;
|
||||
|
||||
if !ct.is_null() && !(*ct).ct_subtype.is_null() {
|
||||
Some(to_string((*ct).ct_subtype))
|
||||
Some(to_string_lossy((*ct).ct_subtype))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user