aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-09-19 15:37:16 -0500
committerGitHub <noreply@github.com>2016-09-19 15:37:16 -0500
commit7d3c7beb215c18f10c03fb394eff9d152313dc59 (patch)
tree1026c5fd75f571b6520d93b0904819a876e92225
parent9876923b29ae7c4f2b763e368fc34fe8a051afc4 (diff)
parentd985741701c6e78a94d0074d6073cfaef30ff4c3 (diff)
downloadservo-7d3c7beb215c18f10c03fb394eff9d152313dc59.tar.gz
servo-7d3c7beb215c18f10c03fb394eff9d152313dc59.zip
Auto merge of #13322 - jdm:msvc-build-fix, r=KiChjang
Make dummy font implementation conform to API changes. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13321 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13322) <!-- Reviewable:end -->
-rw-r--r--components/gfx/platform/dummy/font_template.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/gfx/platform/dummy/font_template.rs b/components/gfx/platform/dummy/font_template.rs
index 5e38165a7c6..3e1145fcbc5 100644
--- a/components/gfx/platform/dummy/font_template.rs
+++ b/components/gfx/platform/dummy/font_template.rs
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+use std::io::Error;
use string_cache::Atom;
use webrender_traits::NativeFontHandle;
@@ -12,7 +13,7 @@ pub struct FontTemplateData {
}
impl FontTemplateData {
- pub fn new(identifier: Atom, font_data: Option<Vec<u8>>) -> FontTemplateData {
+ pub fn new(identifier: Atom, font_data: Option<Vec<u8>>) -> Result<FontTemplateData, Error> {
let bytes = match font_data {
Some(bytes) => {
bytes
@@ -22,10 +23,10 @@ impl FontTemplateData {
}
};
- FontTemplateData {
+ Ok(FontTemplateData {
bytes: bytes,
identifier: identifier,
- }
+ })
}
pub fn bytes(&self) -> Vec<u8> {
self.bytes.clone()