mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
avoid many uses of unwrap in font_cache_thread.rs
This commit is contained in:
parent
d3a1a4ec7d
commit
267f96e731
1 changed files with 3 additions and 3 deletions
|
@ -165,11 +165,11 @@ impl FontCache {
|
||||||
match msg {
|
match msg {
|
||||||
Command::GetFontTemplate(family, descriptor, result) => {
|
Command::GetFontTemplate(family, descriptor, result) => {
|
||||||
let maybe_font_template = self.find_font_template(&family, &descriptor);
|
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) => {
|
Command::GetLastResortFontTemplate(descriptor, result) => {
|
||||||
let font_template = self.last_resort_font_template(&descriptor);
|
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) => {
|
Command::AddWebFont(family_name, sources, result) => {
|
||||||
self.handle_add_web_font(family_name, sources, result);
|
self.handle_add_web_font(family_name, sources, result);
|
||||||
|
@ -180,7 +180,7 @@ impl FontCache {
|
||||||
drop(result.send(()));
|
drop(result.send(()));
|
||||||
}
|
}
|
||||||
Command::Exit(result) => {
|
Command::Exit(result) => {
|
||||||
result.send(()).unwrap();
|
let _ = result.send(());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue