aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/platform/macos/font_template.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-04-24 17:40:22 +0200
committerMs2ger <ms2ger@gmail.com>2015-04-24 17:44:47 +0200
commit6a55ae06d75e6997b54b56e006b0ba8a5dfb1fc6 (patch)
tree857a782c74937a216305a13eff73607a591bd196 /components/gfx/platform/macos/font_template.rs
parent4ee89363fb6d538e28dd9375e69580d139ddacea (diff)
downloadservo-6a55ae06d75e6997b54b56e006b0ba8a5dfb1fc6.tar.gz
servo-6a55ae06d75e6997b54b56e006b0ba8a5dfb1fc6.zip
Remove some as_slice calls.
Diffstat (limited to 'components/gfx/platform/macos/font_template.rs')
-rw-r--r--components/gfx/platform/macos/font_template.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/gfx/platform/macos/font_template.rs b/components/gfx/platform/macos/font_template.rs
index 02865733990..a4cda3b5a66 100644
--- a/components/gfx/platform/macos/font_template.rs
+++ b/components/gfx/platform/macos/font_template.rs
@@ -26,7 +26,7 @@ impl FontTemplateData {
pub fn new(identifier: &str, font_data: Option<Vec<u8>>) -> FontTemplateData {
let ctfont = match font_data {
Some(ref bytes) => {
- let fontprov = CGDataProvider::from_buffer(bytes.as_slice());
+ let fontprov = CGDataProvider::from_buffer(bytes);
let cgfont_result = CGFont::from_data_provider(fontprov);
match cgfont_result {
Ok(cgfont) => Some(core_text::font::new_from_CGFont(&cgfont, 0.0)),
@@ -34,7 +34,7 @@ impl FontTemplateData {
}
},
None => {
- Some(core_text::font::new_from_name(identifier.as_slice(), 0.0).unwrap())
+ Some(core_text::font::new_from_name(&identifier, 0.0).unwrap())
}
};