Skip to content

Commit

Permalink
Use if let rather than match
Browse files Browse the repository at this point in the history
Fixes #12236.
  • Loading branch information
perlun committed Jul 4, 2016
1 parent 80cb0cf commit 9a6bd6c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions components/servo/lib.rs
Expand Up @@ -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
Expand Down

0 comments on commit 9a6bd6c

Please sign in to comment.