Move to to_owned rather than into_string.

into_string has been removed from Rust.
This commit is contained in:
Ms2ger 2015-01-20 14:45:36 +01:00
parent 2d5b0e0855
commit 01ed338746
67 changed files with 473 additions and 383 deletions

View file

@ -16,6 +16,7 @@ use compositing::windowing::{WindowNavigateMsg, WindowEvent};
use glutin_app;
use libc::c_int;
use servo_util::opts;
use std::borrow::ToOwned;
use std::cell::{Cell, RefCell};
use std::sync::atomic::{AtomicInt, SeqCst};
@ -204,7 +205,7 @@ fn browser_host_create(window_info: &cef_window_info_t,
callback_executed: bool)
-> CefBrowser {
let mut urls = Vec::new();
urls.push("http://s27.postimg.org/vqbtrolyr/servo.jpg".into_string());
urls.push("http://s27.postimg.org/vqbtrolyr/servo.jpg".to_owned());
let mut opts = opts::default_opts();
opts.urls = urls;
let browser = ServoCefBrowser::new(window_info, client).as_cef_interface();

View file

@ -12,6 +12,7 @@ use rustrt::local::Local;
use rustrt::task;
use servo_util::opts;
use servo_util::opts::RenderApi;
use std::borrow::ToOwned;
use std::c_str::CString;
use std::rt;
use browser;
@ -31,7 +32,7 @@ static CEF_API_HASH_PLATFORM: &'static [u8] = b"2bc564c3871965ef3a2531b528bda3e1
#[cfg(target_os="linux")]
fn resources_path() -> Option<String> {
Some("../../servo/resources".into_string())
Some("../../servo/resources".to_owned())
}
#[cfg(not(target_os="linux"))]
@ -70,7 +71,7 @@ pub extern "C" fn cef_initialize(args: *const cef_main_args_t,
create_rust_task();
let urls = vec![HOME_URL.into_string()];
let urls = vec![HOME_URL.to_owned()];
opts::set_opts(opts::Opts {
urls: urls,
n_paint_threads: 1,