mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Replace uses of for foo in bar.iter()
,
and `for foo in bar.iter_mut(), and for foo in bar.into_iter() (continuation of #7197)
This commit is contained in:
parent
f4b526cfb4
commit
067a22a868
32 changed files with 76 additions and 78 deletions
|
@ -282,7 +282,7 @@ impl ImageCache {
|
|||
let completed_load = CompletedLoad::new(image_response.clone());
|
||||
self.completed_loads.insert(url, completed_load);
|
||||
|
||||
for listener in pending_load.listeners.into_iter() {
|
||||
for listener in pending_load.listeners {
|
||||
listener.notify(image_response.clone());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ impl ResourceManager {
|
|||
fn set_cookies_for_url(&mut self, request: Url, cookie_list: String, source: CookieSource) {
|
||||
let header = Header::parse_header(&[cookie_list.into_bytes()]);
|
||||
if let Ok(SetCookie(cookies)) = header {
|
||||
for bare_cookie in cookies.into_iter() {
|
||||
for bare_cookie in cookies {
|
||||
if let Some(cookie) = cookie::Cookie::new_wrapped(bare_cookie, &request, source) {
|
||||
self.cookie_storage.push(cookie, source);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue