Use if let in ScriptTask::notify_devtools.

This commit is contained in:
Ms2ger 2015-10-30 15:45:48 +01:00
parent b0841e007e
commit 2f88264351

View file

@ -1656,9 +1656,7 @@ impl ScriptTask {
}
fn notify_devtools(&self, title: DOMString, url: Url, ids: (PipelineId, Option<WorkerId>)) {
match self.devtools_chan {
None => {}
Some(ref chan) => {
if let Some(ref chan) = self.devtools_chan {
let page_info = DevtoolsPageInfo {
title: title,
url: url,
@ -1669,7 +1667,6 @@ impl ScriptTask {
page_info)).unwrap();
}
}
}
fn scroll_fragment_point(&self, pipeline_id: PipelineId, element: &Element) {
let rect = element.upcast::<Node>().get_bounding_content_box();