diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-04-24 17:40:22 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-04-24 17:44:47 +0200 |
commit | 6a55ae06d75e6997b54b56e006b0ba8a5dfb1fc6 (patch) | |
tree | 857a782c74937a216305a13eff73607a591bd196 /components/gfx/platform/macos | |
parent | 4ee89363fb6d538e28dd9375e69580d139ddacea (diff) | |
download | servo-6a55ae06d75e6997b54b56e006b0ba8a5dfb1fc6.tar.gz servo-6a55ae06d75e6997b54b56e006b0ba8a5dfb1fc6.zip |
Remove some as_slice calls.
Diffstat (limited to 'components/gfx/platform/macos')
-rw-r--r-- | components/gfx/platform/macos/font_list.rs | 2 | ||||
-rw-r--r-- | components/gfx/platform/macos/font_template.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/components/gfx/platform/macos/font_list.rs b/components/gfx/platform/macos/font_list.rs index 4e327cea1b8..d5d221f375e 100644 --- a/components/gfx/platform/macos/font_list.rs +++ b/components/gfx/platform/macos/font_list.rs @@ -24,7 +24,7 @@ pub fn get_variations_for_family<F>(family_name: &str, mut callback: F) where F: debug!("Looking for faces of family: {}", family_name); let family_collection = - core_text::font_collection::create_for_family(family_name.as_slice()); + core_text::font_collection::create_for_family(family_name); match family_collection { Some(family_collection) => { let family_descriptors = family_collection.get_descriptors(); 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()) } }; |