diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-08-27 14:50:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-27 14:50:42 -0500 |
commit | a0f45c6850b68f40244fe92c7d2af3f6929940bf (patch) | |
tree | 8318e999ec0d0ccb3f08ea93ef0875a3081f06d8 /components/script | |
parent | 23b83aaa1e638f9763f29f254e6dfa1f0e3c6067 (diff) | |
parent | 10cf2ee11a111133313e679b1485bcedad4c3df0 (diff) | |
download | servo-a0f45c6850b68f40244fe92c7d2af3f6929940bf.tar.gz servo-a0f45c6850b68f40244fe92c7d2af3f6929940bf.zip |
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 -->
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/serviceworker_manager.rs | 4 |
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"); |