diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-07-17 22:51:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-17 22:51:12 -0400 |
commit | b63ce282aa5afe25df3a7a41f4fae10bcd98daad (patch) | |
tree | 31f576dcfaaad75874425c2983647863e76473dc /components/script/dom/htmlscriptelement.rs | |
parent | 8ce3ff656dcb4cc179a03600619507cdeea2f790 (diff) | |
parent | a62a30ef83ef3925874fe9e8f484b2c4e0dccc54 (diff) | |
download | servo-b63ce282aa5afe25df3a7a41f4fae10bcd98daad.tar.gz servo-b63ce282aa5afe25df3a7a41f4fae10bcd98daad.zip |
Auto merge of #27303 - camelid:async-to-asynch, r=jdm
Use `asynch` instead of `r#async`
<!-- Please describe your changes on the following line: -->
This is a vestige of the transition from 2015 to 2018 edition Rust.
`async` was added as a keyword in 2018 edition Rust, so `cargo fix`
changed the variable name here to `r#async`.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because this is just an internal name change
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
-rw-r--r-- | components/script/dom/htmlscriptelement.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index 922a9ad2939..b70e83d5a33 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -402,9 +402,9 @@ impl HTMLScriptElement { // Step 3. let element = self.upcast::<Element>(); - let r#async = element.has_attribute(&local_name!("async")); + let asynch = element.has_attribute(&local_name!("async")); // Note: confusingly, this is done if the element does *not* have an "async" attribute. - if was_parser_inserted && !r#async { + if was_parser_inserted && !asynch { self.non_blocking.set(true); } @@ -556,14 +556,14 @@ impl HTMLScriptElement { // Preparation for step 26. let kind = if element.has_attribute(&local_name!("defer")) && was_parser_inserted && - !r#async + !asynch { // Step 26.a: classic, has src, has defer, was parser-inserted, is not async. ExternalScriptKind::Deferred - } else if was_parser_inserted && !r#async { + } else if was_parser_inserted && !asynch { // Step 26.c: classic, has src, was parser-inserted, is not async. ExternalScriptKind::ParsingBlocking - } else if !r#async && !self.non_blocking.get() { + } else if !asynch && !self.non_blocking.get() { // Step 26.d: classic, has src, is not async, is not non-blocking. ExternalScriptKind::AsapInOrder } else { @@ -600,9 +600,9 @@ impl HTMLScriptElement { credentials_mode.unwrap(), ); - if !r#async && was_parser_inserted { + if !asynch && was_parser_inserted { doc.add_deferred_script(self); - } else if !r#async && !self.non_blocking.get() { + } else if !asynch && !self.non_blocking.get() { doc.push_asap_in_order_script(self); } else { doc.add_asap_script(self); @@ -641,9 +641,9 @@ impl HTMLScriptElement { // We should add inline module script elements // into those vectors in case that there's no // descendants in the inline module script. - if !r#async && was_parser_inserted { + if !asynch && was_parser_inserted { doc.add_deferred_script(self); - } else if !r#async && !self.non_blocking.get() { + } else if !asynch && !self.non_blocking.get() { doc.push_asap_in_order_script(self); } else { doc.add_asap_script(self); |