From 2c032edc16795f613ba3239422838f6cb52ec3d3 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 20 Jun 2015 13:40:09 +0200 Subject: [PATCH] Remove unnecessary transmute in cef_string_list_value. --- ports/cef/string_list.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/cef/string_list.rs b/ports/cef/string_list.rs index e10df59bc56..26897552ea3 100644 --- a/ports/cef/string_list.rs +++ b/ports/cef/string_list.rs @@ -4,7 +4,6 @@ use libc::{c_int}; use std::boxed; -use std::mem; use std::slice; use string::cef_string_utf16_set; use types::{cef_string_list_t,cef_string_t}; @@ -41,7 +40,7 @@ pub extern "C" fn cef_string_list_value(lt: *mut cef_string_list_t, index: c_int if index as usize > (*lt).len() - 1 { return 0; } let ref string = (*lt)[index as usize]; let utf16_chars: Vec = Utf16Encoder::new(string.chars()).collect(); - cef_string_utf16_set(mem::transmute(utf16_chars.as_ptr()), utf16_chars.len() as u64, value, 1) + cef_string_utf16_set(utf16_chars.as_ptr(), utf16_chars.len() as u64, value, 1) } }