diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-04 13:53:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-04 13:53:05 -0700 |
commit | f9e058d5e7ca3bf47b29016f5fb275e0271dce9f (patch) | |
tree | d00e789d76320d436ee07cc373f2adbb636b4df3 | |
parent | 3b0dadda529a5ba45a8a0dc394187f43a66e7c1f (diff) | |
parent | 9a6bd6c996e240c203c8def24edb44fdc5e68856 (diff) | |
download | servo-f9e058d5e7ca3bf47b29016f5fb275e0271dce9f.tar.gz servo-f9e058d5e7ca3bf47b29016f5fb275e0271dce9f.zip |
Auto merge of #12240 - perlun:fix/use-if-let, r=ConnorGBrewster
Use if let rather than match
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12236
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because @jdm said so. 😉 Trivial change so as long as it compiles, "ship it".
Fixes #12236.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12240)
<!-- Reviewable:end -->
-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 |