mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move to to_owned rather than into_string.
into_string has been removed from Rust.
This commit is contained in:
parent
2d5b0e0855
commit
01ed338746
67 changed files with 473 additions and 383 deletions
|
@ -6,6 +6,8 @@ use core_foundation::base::TCFType;
|
|||
use core_foundation::string::{CFString, CFStringRef};
|
||||
use core_text::font_descriptor::{CTFontDescriptor, CTFontDescriptorRef};
|
||||
use core_text;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::mem;
|
||||
|
||||
pub fn get_available_families(callback: |String|) {
|
||||
|
@ -42,5 +44,5 @@ pub fn get_system_default_family(_generic_name: &str) -> Option<String> {
|
|||
}
|
||||
|
||||
pub fn get_last_resort_font_families() -> Vec<String> {
|
||||
vec!("Arial Unicode MS".into_string(), "Arial".into_string())
|
||||
vec!("Arial Unicode MS".to_owned(), "Arial".to_owned())
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ use core_graphics::font::CGFont;
|
|||
use core_text::font::CTFont;
|
||||
use core_text;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
/// Platform specific font representation for mac.
|
||||
/// The identifier is a PostScript font name. The
|
||||
/// CTFont object is cached here for use by the
|
||||
|
@ -34,7 +36,7 @@ impl FontTemplateData {
|
|||
|
||||
FontTemplateData {
|
||||
ctfont: ctfont,
|
||||
identifier: identifier.into_string(),
|
||||
identifier: identifier.to_owned(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue