aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlscriptelement.rs
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2020-07-16 20:45:24 -0700
committerCamelid <camelidcamel@gmail.com>2020-07-16 20:52:19 -0700
commita62a30ef83ef3925874fe9e8f484b2c4e0dccc54 (patch)
treef74e513876ba87030b2966b7854306ee5653f431 /components/script/dom/htmlscriptelement.rs
parent12d4c0d5eb029044b347765910a57236343641d7 (diff)
downloadservo-a62a30ef83ef3925874fe9e8f484b2c4e0dccc54.tar.gz
servo-a62a30ef83ef3925874fe9e8f484b2c4e0dccc54.zip
Use `asynch` instead of `r#async`
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`.
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
-rw-r--r--components/script/dom/htmlscriptelement.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index fb5bca5fb2c..285612afdec 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -400,9 +400,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);
}
@@ -554,14 +554,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 {
@@ -598,9 +598,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);
@@ -637,9 +637,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);