aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/font_cache_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-05 00:06:44 -0700
committerGitHub <noreply@github.com>2016-07-05 00:06:44 -0700
commite3eeb643f0b64107bcec01c9075f8bd9cefe58b3 (patch)
tree3e601552bdf48ad938910b88ebf43a34af140c17 /components/gfx/font_cache_thread.rs
parent61491447e21655a1eca01a85797b25a254525d98 (diff)
parent267f96e7310623adc21427d0f60d0c81c53f73cf (diff)
downloadservo-e3eeb643f0b64107bcec01c9075f8bd9cefe58b3.tar.gz
servo-e3eeb643f0b64107bcec01c9075f8bd9cefe58b3.zip
Auto merge of #12237 - hgallagher1993:servo, r=jdm
Avoid many uses of unwrap in font_cache_thread.rs Replaced `result.send(...blah...).unwrap()` with `let _ = result.send(...blah...);` in `components/gfx/font_cache_thread.rs` - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12188 - [X] These changes do not require tests because @jdm said if it compiles it's good enough <!-- 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/12237) <!-- Reviewable:end -->
Diffstat (limited to 'components/gfx/font_cache_thread.rs')
-rw-r--r--components/gfx/font_cache_thread.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs
index 9a88cce953b..b7e68e9efb7 100644
--- a/components/gfx/font_cache_thread.rs
+++ b/components/gfx/font_cache_thread.rs
@@ -165,11 +165,11 @@ impl FontCache {
match msg {
Command::GetFontTemplate(family, descriptor, result) => {
let maybe_font_template = self.find_font_template(&family, &descriptor);
- result.send(Reply::GetFontTemplateReply(maybe_font_template)).unwrap();
+ let _ = result.send(Reply::GetFontTemplateReply(maybe_font_template));
}
Command::GetLastResortFontTemplate(descriptor, result) => {
let font_template = self.last_resort_font_template(&descriptor);
- result.send(Reply::GetFontTemplateReply(Some(font_template))).unwrap();
+ let _ = result.send(Reply::GetFontTemplateReply(Some(font_template)));
}
Command::AddWebFont(family_name, sources, result) => {
self.handle_add_web_font(family_name, sources, result);
@@ -180,7 +180,7 @@ impl FontCache {
drop(result.send(()));
}
Command::Exit(result) => {
- result.send(()).unwrap();
+ let _ = result.send(());
break;
}
}