mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Avoid some clones.
This commit is contained in:
parent
78ae9a5da0
commit
703d018f23
5 changed files with 13 additions and 17 deletions
|
@ -146,8 +146,8 @@ impl DocumentLoader {
|
|||
}
|
||||
|
||||
/// Mark an in-progress network request complete.
|
||||
pub fn finish_load(&mut self, load: LoadType) {
|
||||
let idx = self.blocking_loads.iter().position(|unfinished| *unfinished == load);
|
||||
pub fn finish_load(&mut self, load: &LoadType) {
|
||||
let idx = self.blocking_loads.iter().position(|unfinished| *unfinished == *load);
|
||||
self.blocking_loads.remove(idx.expect(&format!("unknown completed load {:?}", load)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue