mirror of
https://github.com/servo/servo.git
synced 2025-08-25 23:28:21 +01:00
rename deprecated utf16_units to encode_utf16
This commit is contained in:
parent
743e0c9c87
commit
c880c97b1b
7 changed files with 8 additions and 10 deletions
|
@ -10,7 +10,6 @@
|
|||
#![feature(iter_arith)]
|
||||
#![feature(link_args)]
|
||||
#![feature(plugin)]
|
||||
#![feature(str_utf16)]
|
||||
#![feature(unicode)]
|
||||
#![feature(unsafe_no_drop_flag)]
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ pub extern "C" fn cef_string_utf8_cmp(a: *const cef_string_utf8_t, b: *const cef
|
|||
#[no_mangle]
|
||||
pub extern "C" fn cef_string_utf8_to_utf16(src: *const u8, src_len: size_t, output: *mut cef_string_utf16_t) -> c_int {
|
||||
slice_to_str(src, src_len as usize, |result| {
|
||||
let conv = result.utf16_units().collect::<Vec<u16>>();
|
||||
let conv = result.encode_utf16().collect::<Vec<u16>>();
|
||||
cef_string_utf16_set(conv.as_ptr(), conv.len() as size_t, output, 1);
|
||||
1
|
||||
})
|
||||
|
@ -286,7 +286,7 @@ pub extern "C" fn cef_string_wide_to_utf8(src: *const wchar_t, src_len: size_t,
|
|||
#[no_mangle]
|
||||
pub extern "C" fn cef_string_ascii_to_utf16(src: *const u8, src_len: size_t, output: *mut cef_string_utf16_t) -> c_int {
|
||||
slice_to_str(src, src_len as usize, |result| {
|
||||
let conv = result.utf16_units().collect::<Vec<u16>>();
|
||||
let conv = result.encode_utf16().collect::<Vec<u16>>();
|
||||
cef_string_utf16_set(conv.as_ptr(), conv.len() as size_t, output, 1)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue