mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replace uses of for foo in bar.iter()
and for foo in bar.iter_mut()
closes #7197
This commit is contained in:
parent
13e7de482c
commit
0038580abf
55 changed files with 141 additions and 154 deletions
|
@ -211,7 +211,7 @@ impl TimelineActor {
|
|||
}
|
||||
|
||||
// Emit all markers
|
||||
for (_, queue) in queues.iter_mut() {
|
||||
for (_, queue) in &mut queues {
|
||||
let start_payload = queue.pop_front();
|
||||
group(queue, 0, start_payload, &mut emitter);
|
||||
}
|
||||
|
|
|
@ -347,7 +347,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
|
|||
__type__: "networkEvent".to_string(),
|
||||
eventActor: actor.event_actor(),
|
||||
};
|
||||
for stream in connections.iter_mut() {
|
||||
for stream in &mut connections {
|
||||
stream.write_json_packet(&msg);
|
||||
}
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
|
|||
response: actor.response_start()
|
||||
};
|
||||
|
||||
for stream in connections.iter_mut() {
|
||||
for stream in &mut connections {
|
||||
stream.write_json_packet(&msg);
|
||||
}
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
|
|||
request_id, network_event))) => {
|
||||
// copy the accepted_connections vector
|
||||
let mut connections = Vec::<TcpStream>::new();
|
||||
for stream in accepted_connections.iter() {
|
||||
for stream in &accepted_connections {
|
||||
connections.push(stream.try_clone().unwrap());
|
||||
}
|
||||
//TODO: Get pipeline_id from NetworkEventMessage after fixing the send in http_loader
|
||||
|
@ -441,7 +441,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
|
|||
Err(RecvError) => break
|
||||
}
|
||||
}
|
||||
for connection in accepted_connections.iter_mut() {
|
||||
for connection in &mut accepted_connections {
|
||||
let _ = connection.shutdown(Shutdown::Both);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue