mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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,18 +1656,15 @@ 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 => {}
|
let page_info = DevtoolsPageInfo {
|
||||||
Some(ref chan) => {
|
title: title,
|
||||||
let page_info = DevtoolsPageInfo {
|
url: url,
|
||||||
title: title,
|
};
|
||||||
url: url,
|
chan.send(ScriptToDevtoolsControlMsg::NewGlobal(
|
||||||
};
|
ids,
|
||||||
chan.send(ScriptToDevtoolsControlMsg::NewGlobal(
|
self.devtools_sender.clone(),
|
||||||
ids,
|
page_info)).unwrap();
|
||||||
self.devtools_sender.clone(),
|
|
||||||
page_info)).unwrap();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue