aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/serviceworker_manager.rs
diff options
context:
space:
mode:
authorChiu-Hsiang Hsu <wdv4758h@gmail.com>2016-08-27 14:45:17 +0800
committerChiu-Hsiang Hsu <wdv4758h@gmail.com>2016-08-27 14:45:17 +0800
commit10cf2ee11a111133313e679b1485bcedad4c3df0 (patch)
treea90e10d2f4fef0a1c7a7f00551ed8e0098bd6dca /components/script/serviceworker_manager.rs
parent969aefe01f347060c10e0729e3429113018e4ed1 (diff)
downloadservo-10cf2ee11a111133313e679b1485bcedad4c3df0.tar.gz
servo-10cf2ee11a111133313e679b1485bcedad4c3df0.zip
Remove unnecessary clone from ServiceWorkerManager::prepare_activation
Diffstat (limited to 'components/script/serviceworker_manager.rs')
-rw-r--r--components/script/serviceworker_manager.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/serviceworker_manager.rs b/components/script/serviceworker_manager.rs
index 1c24c6fef3f..09f5288929a 100644
--- a/components/script/serviceworker_manager.rs
+++ b/components/script/serviceworker_manager.rs
@@ -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) {
// do not run the same worker if already active.
warn!("Service worker for {:?} already active", scope_url);
@@ -100,7 +100,7 @@ impl ServiceWorkerManager {
self.own_sender.clone(),
scope_url.clone());
// 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);
} else {
warn!("Unable to activate service worker");