mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove some as_slice calls.
This commit is contained in:
parent
4ee89363fb
commit
6a55ae06d7
34 changed files with 79 additions and 79 deletions
|
@ -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())
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue