diff options
author | Per Lundberg <perlun@gmail.com> | 2016-07-04 23:38:17 +0300 |
---|---|---|
committer | Per Lundberg <perlun@gmail.com> | 2016-07-04 23:38:18 +0300 |
commit | 9a6bd6c996e240c203c8def24edb44fdc5e68856 (patch) | |
tree | c8db2e2b60278d70532472d5789975b50200eace | |
parent | 80cb0cf8214fd52d2884724614c40cb278ee7575 (diff) | |
download | servo-9a6bd6c996e240c203c8def24edb44fdc5e68856.tar.gz servo-9a6bd6c996e240c203c8def24edb44fdc5e68856.zip |
Use if let rather than match
Fixes #12236.
-rw-r--r-- | components/servo/lib.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 96296b92f09..8ef09eb066e 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -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 |