mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +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.is_null() { return; }
|
||||||
if (*smm).len() == 0 { return; }
|
if (*smm).len() == 0 { return; }
|
||||||
for (_, val) in (*smm).iter_mut() {
|
for (_, val) in (*smm).iter_mut() {
|
||||||
while (*val).len() != 0 {
|
while let Some(cs) = (*val).pop() {
|
||||||
let cs = (*val).pop();
|
cef_string_userfree_utf16_free(cs);
|
||||||
cef_string_userfree_utf16_free(cs.unwrap());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(*smm).clear();
|
(*smm).clear();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue