diff options
-rw-r--r-- | ports/cef/string_multimap.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ports/cef/string_multimap.rs b/ports/cef/string_multimap.rs index 49897b0cd3c..d7f8fb2c9c8 100644 --- a/ports/cef/string_multimap.rs +++ b/ports/cef/string_multimap.rs @@ -121,9 +121,8 @@ pub extern "C" fn cef_string_multimap_clear(smm: *mut cef_string_multimap_t) { if smm.is_null() { return; } if (*smm).len() == 0 { return; } for (_, val) in (*smm).iter_mut() { - while (*val).len() != 0 { - let cs = (*val).pop(); - cef_string_userfree_utf16_free(cs.unwrap()); + while let Some(cs) = (*val).pop() { + cef_string_userfree_utf16_free(cs); } } (*smm).clear(); |