From f8ae884ab575530fd479e0001fe2e408cf703e2b Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 26 Jun 2015 23:00:07 +0200 Subject: [PATCH] Stop using deprecated boxed::into_raw in cef. --- ports/cef/string_list.rs | 5 ++--- ports/cef/string_map.rs | 3 +-- ports/cef/string_multimap.rs | 3 +-- ports/cef/wrappers.rs | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ports/cef/string_list.rs b/ports/cef/string_list.rs index 26897552ea3..4b03d45d8d4 100644 --- a/ports/cef/string_list.rs +++ b/ports/cef/string_list.rs @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use libc::{c_int}; -use std::boxed; use std::slice; use string::cef_string_utf16_set; use types::{cef_string_list_t,cef_string_t}; @@ -14,7 +13,7 @@ use rustc_unicode::str::Utf16Encoder; #[no_mangle] pub extern "C" fn cef_string_list_alloc() -> *mut cef_string_list_t { - boxed::into_raw(box vec!()) + Box::into_raw(box vec!()) } #[no_mangle] @@ -66,6 +65,6 @@ pub extern "C" fn cef_string_list_copy(lt: *mut cef_string_list_t) -> *mut cef_s unsafe { if lt.is_null() { return 0 as *mut cef_string_list_t; } let copy = (*lt).clone(); - boxed::into_raw(box copy) + Box::into_raw(box copy) } } diff --git a/ports/cef/string_map.rs b/ports/cef/string_map.rs index 3275fa910c0..27c8abdcc00 100644 --- a/ports/cef/string_map.rs +++ b/ports/cef/string_map.rs @@ -4,7 +4,6 @@ use eutil::slice_to_str; use libc::{c_int}; -use std::boxed; use std::collections::BTreeMap; use string::{cef_string_userfree_utf16_alloc, cef_string_userfree_utf16_free}; use string::{cef_string_utf16_set}; @@ -14,7 +13,7 @@ use types::{cef_string_map_t, cef_string_t}; #[no_mangle] pub extern "C" fn cef_string_map_alloc() -> *mut cef_string_map_t { - boxed::into_raw(box BTreeMap::new()) + Box::into_raw(box BTreeMap::new()) } #[no_mangle] diff --git a/ports/cef/string_multimap.rs b/ports/cef/string_multimap.rs index d7f8fb2c9c8..d8932cea31a 100644 --- a/ports/cef/string_multimap.rs +++ b/ports/cef/string_multimap.rs @@ -4,7 +4,6 @@ use eutil::slice_to_str; use libc::c_int; -use std::boxed; use std::collections::BTreeMap; use string::{cef_string_userfree_utf16_alloc, cef_string_userfree_utf16_free}; use string::{cef_string_utf16_set}; @@ -14,7 +13,7 @@ use types::{cef_string_multimap_t,cef_string_t}; #[no_mangle] pub extern "C" fn cef_string_multimap_alloc() -> *mut cef_string_multimap_t { - boxed::into_raw(box BTreeMap::new()) + Box::into_raw(box BTreeMap::new()) } #[no_mangle] diff --git a/ports/cef/wrappers.rs b/ports/cef/wrappers.rs index ce6873521aa..e7fa79b48ad 100644 --- a/ports/cef/wrappers.rs +++ b/ports/cef/wrappers.rs @@ -34,7 +34,6 @@ use types::{cef_v8_accesscontrol_t, cef_v8_propertyattribute_t, cef_value_type_t use types::{cef_window_info_t, cef_window_open_disposition_t, cef_xml_encoding_type_t, cef_xml_node_type_t}; use libc::{self, c_char, c_int, c_ushort, c_void}; -use std::boxed; use std::collections::HashMap; use std::mem; use std::ptr; @@ -201,7 +200,7 @@ impl<'a> CefWrap<*const cef_string_t> for &'a [u16] { // FIXME(pcwalton): This leaks!! We should instead have the caller pass some scratch // stack space to create the object in. What a botch. - boxed::into_raw(box cef_string_utf16 { + Box::into_raw(box cef_string_utf16 { str: ptr, length: buffer.len() as u64, dtor: Some(free_boxed_utf16_string as extern "C" fn(*mut c_ushort)),