From 9a6bd6c996e240c203c8def24edb44fdc5e68856 Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Mon, 4 Jul 2016 23:38:17 +0300 Subject: [PATCH] Use if let rather than match Fixes #12236. --- components/servo/lib.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 96296b92f098..8ef09eb066e4 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