From 3d0d004887908ce9e1f3c02d932e03d66a951a4e Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 13 Nov 2014 13:49:12 -0500 Subject: [PATCH] embedding: replace transmutes with manual casts in cef_string_utf8_cmp() --- ports/cef/string.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/cef/string.rs b/ports/cef/string.rs index f0a58ca7478..3dad83a711c 100644 --- a/ports/cef/string.rs +++ b/ports/cef/string.rs @@ -96,8 +96,8 @@ pub extern "C" fn cef_string_utf8_set(src: *const u8, src_len: size_t, output: * #[no_mangle] pub extern "C" fn cef_string_utf8_cmp(a: *const cef_string_utf8_t, b: *const cef_string_utf8_t) -> c_int { unsafe { - slice::raw::buf_as_slice(mem::transmute((*a).str), (*a).length as uint, |astr:&[u8]| { - slice::raw::buf_as_slice(mem::transmute((*b).str), (*b).length as uint, |bstr:&[u8]| { + slice::raw::buf_as_slice((*a).str as *const u8, (*a).length as uint, |astr:&[u8]| { + slice::raw::buf_as_slice((*b).str as *const u8, (*b).length as uint, |bstr:&[u8]| { match astr.cmp(&bstr) { Less => -1, Equal => 0,