Auto merge of #13076 - wdv4758h:serviceworker_manager, r=jdm

Remove unnecessary clone from ServiceWorkerManager::prepare_activation

remove unnecessary for `scope_url`

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12999
- [X] These changes do not require tests because it should works when it compiles

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13076)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-27 14:50:42 -05:00 committed by GitHub
commit a0f45c6850

View file

@ -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");