mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Use if let in ScriptTask::notify_devtools.
This commit is contained in:
parent
b0841e007e
commit
2f88264351
1 changed files with 9 additions and 12 deletions
|
@ -1656,9 +1656,7 @@ impl ScriptTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn notify_devtools(&self, title: DOMString, url: Url, ids: (PipelineId, Option<WorkerId>)) {
|
fn notify_devtools(&self, title: DOMString, url: Url, ids: (PipelineId, Option<WorkerId>)) {
|
||||||
match self.devtools_chan {
|
if let Some(ref chan) = self.devtools_chan {
|
||||||
None => {}
|
|
||||||
Some(ref chan) => {
|
|
||||||
let page_info = DevtoolsPageInfo {
|
let page_info = DevtoolsPageInfo {
|
||||||
title: title,
|
title: title,
|
||||||
url: url,
|
url: url,
|
||||||
|
@ -1669,7 +1667,6 @@ impl ScriptTask {
|
||||||
page_info)).unwrap();
|
page_info)).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn scroll_fragment_point(&self, pipeline_id: PipelineId, element: &Element) {
|
fn scroll_fragment_point(&self, pipeline_id: PipelineId, element: &Element) {
|
||||||
let rect = element.upcast::<Node>().get_bounding_content_box();
|
let rect = element.upcast::<Node>().get_bounding_content_box();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue