From 6147f33bb54dfa2eb5b870577facce1269342feb Mon Sep 17 00:00:00 2001 From: Gleb Kozyrev Date: Thu, 8 Oct 2015 18:17:46 +0300 Subject: [PATCH] Workaround the libstd breaking change https://github.com/rust-lang/rust/pull/28811 --- src/image_surface.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image_surface.rs b/src/image_surface.rs index 93710193..e2863d12 100644 --- a/src/image_surface.rs +++ b/src/image_surface.rs @@ -36,7 +36,7 @@ impl ImageSurface { where F: FnOnce(Box<[u8]>) + 'static { unsafe { let mut data = Box::new(AsyncBorrow::new(data, free)); - let ptr = data.as_mut().as_mut_ptr(); + let ptr = (*data).as_mut().as_mut_ptr(); let surface = ImageSurface::from_glib_full( ffi::cairo_image_surface_create_for_data(ptr, format, width, height, stride)); surface.set_user_data(&IMAGE_SURFACE_DATA, data).unwrap();