From 5004481eb0b5fdbb24d2ca56fd47767be7690057 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Tue, 10 Jun 2014 05:05:56 -0400 Subject: [PATCH] Update android specific bits for newer rust. --- platform/android/surface.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platform/android/surface.rs b/platform/android/surface.rs index 808a33b..a19a63e 100644 --- a/platform/android/surface.rs +++ b/platform/android/surface.rs @@ -17,7 +17,6 @@ use opengles::gl2::{egl_image_target_texture2d_oes, TEXTURE_2D, glTexImage2D, BG use egl::egl::EGLDisplay; use egl::eglext::{EGLImageKHR, DestroyImageKHR}; use libc::c_void; -use std::cast; use std::mem; use std::ptr; use std::vec::Vec; @@ -85,7 +84,7 @@ impl NativeSurfaceMethods for NativeSurface { NativeSurface { image: None, - bitmap: cast::transmute(bitmap.as_ptr()), + bitmap: mem::transmute(bitmap.as_ptr()), will_leak : true, } } @@ -119,7 +118,7 @@ impl NativeSurfaceMethods for NativeSurface { fn upload(&self, _graphics_context: &NativePaintingGraphicsContext, data: &[u8]) { unsafe { if self.bitmap != ptr::null() { - let dest:&mut [u8] = cast::transmute((self.bitmap, data.len())); + let dest:&mut [u8] = mem::transmute((self.bitmap, data.len())); dest.copy_memory(data); } else {