mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
fix #18594: Unnecessarily allocating an error string
This commit is contained in:
parent
84ac9f384a
commit
7db47f8084
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ impl DocumentLoader {
|
|||
pub fn finish_load(&mut self, load: &LoadType) {
|
||||
debug!("Removing blocking load {:?} ({}).", load, self.blocking_loads.len());
|
||||
let idx = self.blocking_loads.iter().position(|unfinished| *unfinished == *load);
|
||||
self.blocking_loads.remove(idx.expect(&format!("unknown completed load {:?}", load)));
|
||||
self.blocking_loads.remove(idx.unwrap_or_else(|| panic!("unknown completed load {:?}", load)));
|
||||
}
|
||||
|
||||
pub fn is_blocked(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue