Use if let rather than match

Fixes #12236.
This commit is contained in:
Per Lundberg 2016-07-04 23:38:17 +03:00
parent 80cb0cf821
commit 9a6bd6c996

View file

@ -237,12 +237,8 @@ fn create_constellation(opts: opts::Opts,
layout_thread::LayoutThread,
script::script_thread::ScriptThread>::start(initial_state);
// Send the URL command to the constellation.
match opts.url {
Some(url) => {
constellation_chan.send(ConstellationMsg::InitLoadUrl(url)).unwrap();
},
None => ()
if let Some(url) = opts.url {
constellation_chan.send(ConstellationMsg::InitLoadUrl(url)).unwrap();
};
constellation_chan