aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/stylesheet_loader.rs
diff options
context:
space:
mode:
authorSimon Wülker <simon.wuelker@arcor.de>2025-03-13 11:28:11 +0100
committerGitHub <noreply@github.com>2025-03-13 10:28:11 +0000
commitbb0d08432ee87054bbbda2cdef977fc5a28ee8de (patch)
treef0a71bb737927068212706eaf983c5f613eacb55 /components/script/stylesheet_loader.rs
parenteb2ca42824716faeab4cf31e275bb4136cc38e7d (diff)
downloadservo-bb0d08432ee87054bbbda2cdef977fc5a28ee8de.tar.gz
servo-bb0d08432ee87054bbbda2cdef977fc5a28ee8de.zip
Migrate to the 2024 edition (#35755)
* Migrate to 2024 edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow unsafe_op_in_unsafe_fn lint This lint warns by default in the 2024 edition, but is *way* too noisy for servo. We might enable it in the future, but not now. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Compile using the 2024 edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Diffstat (limited to 'components/script/stylesheet_loader.rs')
-rw-r--r--components/script/stylesheet_loader.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/stylesheet_loader.rs b/components/script/stylesheet_loader.rs
index 2e150d2862e..6570c3df284 100644
--- a/components/script/stylesheet_loader.rs
+++ b/components/script/stylesheet_loader.rs
@@ -188,7 +188,7 @@ impl FetchResponseListener for StylesheetContext {
// else we risk applying the wrong stylesheet when responses come out-of-order.
let is_stylesheet_load_applicable = self
.request_generation_id
- .is_none_or(|gen| gen == link.get_request_generation_id());
+ .is_none_or(|generation| generation == link.get_request_generation_id());
if is_stylesheet_load_applicable {
let shared_lock = document.style_shared_lock().clone();
let sheet = Arc::new(Stylesheet::from_bytes(
@@ -314,7 +314,7 @@ impl StylesheetLoader<'_> {
.elem
.containing_shadow_root()
.map(|sr| Trusted::new(&*sr));
- let gen = self
+ let generation = self
.elem
.downcast::<HTMLLinkElement>()
.map(HTMLLinkElement::get_request_generation_id);
@@ -327,7 +327,7 @@ impl StylesheetLoader<'_> {
document: Trusted::new(&*document),
shadow_root,
origin_clean: true,
- request_generation_id: gen,
+ request_generation_id: generation,
resource_timing: ResourceFetchTiming::new(ResourceTimingType::Resource),
};