From b4ff76e4ac818986ce063e7ec8d82c36de010eff Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 5 Apr 2014 17:28:31 +0200 Subject: [PATCH 1/2] Update to current rust: struct fields are private by default. --- platform/linux.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/linux.rs b/platform/linux.rs index 35a6724..a05899c 100644 --- a/platform/linux.rs +++ b/platform/linux.rs @@ -171,9 +171,9 @@ fn ScreenOfDisplay(dpy: *Display, scr: c_int) -> *Screen { /// Linux-specific interface to 3D graphics contexts. pub struct GraphicsContext { - priv display: *Display, - priv pixmap: GLXPixmap, - priv context: Arc, + display: *Display, + pixmap: GLXPixmap, + context: Arc, } impl GraphicsContext { From 94e28db4128ac24de0fd663efa72fb767a352d36 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 5 Apr 2014 17:28:43 +0200 Subject: [PATCH 2/2] Update to current rust: RefCell::{get, set} are gone. --- platform/linux.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux.rs b/platform/linux.rs index a05899c..04aff4b 100644 --- a/platform/linux.rs +++ b/platform/linux.rs @@ -186,7 +186,7 @@ impl GraphicsContext { None => glXCreateContext(display, visual, null(), 1), Some(share_context) => { let native_share_context = share_context.native(); - glXCreateContext(display, visual, *native_share_context.get(), 1) + glXCreateContext(display, visual, *native_share_context, 1) } }; @@ -255,7 +255,7 @@ impl GraphicsContextMethods for GraphicsContext { let result = glXMakeContextCurrent(self.display, self.pixmap, self.pixmap, - *self.context.get()); + *self.context); assert!(result != 0); } }