mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Use pop() better in cef_string_multimap_clear.
This commit is contained in:
parent
ccc38ef5a1
commit
6ee8a1e476
1 changed files with 2 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue