diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 9f147cfba66..b9719c64f19 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -2037,7 +2037,7 @@ impl Constellation let visibility_msg = ConstellationControlMsg::NotifyVisibilityChange(parent_pipeline_id, browsing_context_id, visibility); - let result = match self.pipelines.get(&parent_pipeline_id) { + let result = match self.pipelines.get(&parent_pipeline_id) { None => return warn!("Parent pipeline {:?} closed", parent_pipeline_id), Some(parent_pipeline) => parent_pipeline.event_loop.send(visibility_msg), }; diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 8390b5371fd..dd708529f88 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -960,7 +960,7 @@ impl Document { let line = click_pos - last_pos; let dist = (line.dot(line) as f64).sqrt(); - if now.duration_since(last_time) < DBL_CLICK_TIMEOUT && + if now.duration_since(last_time) < DBL_CLICK_TIMEOUT && dist < DBL_CLICK_DIST_THRESHOLD as f64 { // A double click has occurred if this click is within a certain time and dist. of previous click. let click_count = 2; diff --git a/components/script/serviceworker_manager.rs b/components/script/serviceworker_manager.rs index 793d7ccf370..2bf19aa25a5 100644 --- a/components/script/serviceworker_manager.rs +++ b/components/script/serviceworker_manager.rs @@ -176,7 +176,7 @@ impl ServiceWorkerManager { } } } else { - let _ = mediator.response_chan.send(None); + let _ = mediator.response_chan.send(None); } } else { let _ = mediator.response_chan.send(None); diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 989b83aa505..3bf6176de44 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -584,6 +584,12 @@ def check_rust(file_name, lines): # -> () is unnecessary (r"-> \(\)", "encountered function signature with -> ()", no_filter), ] + keywords = ["if", "let", "mut", "extern", "as", "impl", "fn", "struct", "enum", "pub", "mod", + "use", "in", "ref", "type", "where", "trait"] + extra_space_after = lambda key: (r"(?)); let shared_url_y_clone = shared_url_y.clone(); let handler = move |request: HyperRequest, mut response: HyperResponse| {