diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-06-03 09:54:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-03 09:54:11 -0400 |
commit | d23bc4f1a4e3e56290f823b0466f7ca6905f8ccd (patch) | |
tree | 4769279ac264be37d41f37e1066ede8df35c4e8e /components/script | |
parent | 5683f09a0b4ed1ca6a5f2075060b36b3ccc0ca36 (diff) | |
parent | f2ad35209f614ea82c12758a0e0e69cf0fa2ddd8 (diff) | |
download | servo-d23bc4f1a4e3e56290f823b0466f7ca6905f8ccd.tar.gz servo-d23bc4f1a4e3e56290f823b0466f7ca6905f8ccd.zip |
Auto merge of #20905 - CYBAI:fix-typo, r=jdm
Fix typo for worklet in globalscope
As the `self` will downcast to `WorkletGlobalScope`, I think it would be more reasonable to name the variable with `worklet` in `if let`.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it just renames the variable name
<!-- 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/20905)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/globalscope.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs index 29c06ce7a17..cec59c92510 100644 --- a/components/script/dom/globalscope.rs +++ b/components/script/dom/globalscope.rs @@ -300,9 +300,9 @@ impl GlobalScope { // https://html.spec.whatwg.org/multipage/#script-settings-for-workers:api-base-url return worker.get_url().clone(); } - if let Some(worker) = self.downcast::<WorkletGlobalScope>() { + if let Some(worklet) = self.downcast::<WorkletGlobalScope>() { // https://drafts.css-houdini.org/worklets/#script-settings-for-worklets - return worker.base_url(); + return worklet.base_url(); } unreachable!(); } @@ -315,9 +315,9 @@ impl GlobalScope { if let Some(worker) = self.downcast::<WorkerGlobalScope>() { return worker.get_url().clone(); } - if let Some(worker) = self.downcast::<WorkletGlobalScope>() { + if let Some(worklet) = self.downcast::<WorkletGlobalScope>() { // TODO: is this the right URL to return? - return worker.base_url(); + return worklet.base_url(); } unreachable!(); } |