mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Remove unnecessary clone from ServiceWorkerManager::prepare_activation
This commit is contained in:
parent
969aefe01f
commit
10cf2ee11a
1 changed files with 2 additions and 2 deletions
|
@ -72,7 +72,7 @@ impl ServiceWorkerManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref scope_url) = scope_url {
|
if let Some(scope_url) = scope_url {
|
||||||
if self.active_workers.contains_key(&scope_url) {
|
if self.active_workers.contains_key(&scope_url) {
|
||||||
// do not run the same worker if already active.
|
// do not run the same worker if already active.
|
||||||
warn!("Service worker for {:?} already active", scope_url);
|
warn!("Service worker for {:?} already active", scope_url);
|
||||||
|
@ -100,7 +100,7 @@ impl ServiceWorkerManager {
|
||||||
self.own_sender.clone(),
|
self.own_sender.clone(),
|
||||||
scope_url.clone());
|
scope_url.clone());
|
||||||
// We store the activated worker
|
// We store the activated worker
|
||||||
self.active_workers.insert(scope_url.clone(), scope_things.clone());
|
self.active_workers.insert(scope_url, scope_things.clone());
|
||||||
return Some(sender);
|
return Some(sender);
|
||||||
} else {
|
} else {
|
||||||
warn!("Unable to activate service worker");
|
warn!("Unable to activate service worker");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue